소스 검색

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);
                     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);