فهرست منبع

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 13 سال پیش
والد
کامیت
247dcbc443
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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);
                     StringBuffer namebuf(resourceNameStr);
                     SecResourceType rtype = str2type(rtypestr);
                     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.");
                         namebuf.insert(0, "repository.");
                     if(prefix && *prefix)
                     if(prefix && *prefix)
                         namebuf.insert(0, prefix);
                         namebuf.insert(0, prefix);