提交 b2a1d808 编写于 作者: K kohsuke

[FIXED HUDSON-1773] needs to check Permission.impliedBy. In 1.222.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9826 71c3de6d-444a-0410-be80-ed276b4c234a
上级 3143dcac
......@@ -80,8 +80,12 @@ public class GlobalMatrixAuthorizationStrategy extends AuthorizationStrategy {
* Checks if the given SID has the given permission.
*/
public boolean hasPermission(String sid, Permission p) {
Set<String> set = grantedPermissions.get(p);
return set!=null && set.contains(sid);
for(; p!=null; p=p.impliedBy) {
Set<String> set = grantedPermissions.get(p);
if(set!=null && set.contains(sid))
return true;
}
return false;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册