mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
permissions granted to anonymous users are granted to everyone
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6418 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
4456013783
commit
3b1d02faca
1 file changed
+8
-1
@@ -11,6 +11,7 @@ import net.sf.json.JSONObject;
|
||||
import org.acegisecurity.acls.sid.GrantedAuthoritySid;
|
||||
import org.acegisecurity.acls.sid.PrincipalSid;
|
||||
import org.acegisecurity.acls.sid.Sid;
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -100,7 +101,13 @@ public class GlobalMatrixAuthorizationStrategy extends AuthorizationStrategy {
|
||||
if(GlobalMatrixAuthorizationStrategy.this.hasPermission(toString(p),permission))
|
||||
return true;
|
||||
return null;
|
||||
}
|
||||
|
||||
protected Boolean _hasPermission(Authentication a, Permission permission) {
|
||||
Boolean b = super._hasPermission(a,permission);
|
||||
// permissions granted to anonymous users are granted to everyone
|
||||
if(b==null) b=hasPermission(ANONYMOUS,permission);
|
||||
return b;
|
||||
}
|
||||
|
||||
private String toString(Sid p) {
|
||||
@@ -184,7 +191,7 @@ public class GlobalMatrixAuthorizationStrategy extends AuthorizationStrategy {
|
||||
}
|
||||
|
||||
public String getHelpFile() {
|
||||
return "/help/security/full-control-once-logged-in.html";
|
||||
return "/help/security/global-matrix.html";
|
||||
}
|
||||
|
||||
public List<Group> getAllGroups() {
|
||||
|
||||
Reference in new issue
Block a user