Explorar o código

Fix gh-3024 Allow set permissions for repository root

When examining repository module type, code was referencing incorrect
resource name variable, resulting in "repository." being prepended to the
resource name (so "repository" because "repository.repository". Corrected
code to look at namebuf.str and tested on Windows and Ubuntu. The 0
return code will be address in gh-3023

Signed-off-by: William Whitehead <william.whitehead@lexisnexis.com>
William Whitehead %!s(int64=13) %!d(string=hai) anos
pai
achega
247dcbc443
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      esp/services/ws_access/ws_accessService.cpp

+ 1 - 1
esp/services/ws_access/ws_accessService.cpp

@@ -2374,7 +2374,7 @@ bool Cws_accessEx::onPermissionAction(IEspContext &context, IEspPermissionAction
 
                     StringBuffer namebuf(resourceNameStr);
                     SecResourceType rtype = str2type(rtypestr);
-                    if(rtype == RT_MODULE && (stricmp(namebuf.str(), "codegenerator.cpp")) && stricmp(name, "repository") != 0 && Utils::strncasecmp(name, "repository.", 11) != 0)
+                    if(rtype == RT_MODULE && stricmp(namebuf.str(), "codegenerator.cpp") && stricmp(namebuf.str(), "repository") != 0 && Utils::strncasecmp(namebuf.str(), "repository.", 11) != 0)
                         namebuf.insert(0, "repository.");
                     if(prefix && *prefix)
                         namebuf.insert(0, prefix);