@Override public boolean hasPermission(@Nonnull Authentication a, Permission permission) { if(a==SYSTEM) { if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>SYSTEM user has full access"); return true; } Boolean b = _hasPermission(a,permission); if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>"+(b==null?"null, thus false":b)); if(b==null) b=false; // default to rejection return b; }
protected Boolean hasPermission(Sid p, Permission permission) { Boolean b = child.hasPermission(p, permission); if(b!=null) return b; return parent.hasPermission(p,permission); } };
@Override public ACL getACL(Job<?,?> project) { AuthorizationMatrixProperty amp = project.getProperty(AuthorizationMatrixProperty.class); if (amp != null) { return amp.getACL().newInheritingACL(getRootACL()); } else { return getRootACL(); } }
@Override public ACL getACL(Job<?,?> project) { AuthorizationMatrixProperty amp = project.getProperty(AuthorizationMatrixProperty.class); if (amp != null) { return amp.getACL().newInheritingACL(getRootACL()); } else { return getRootACL(); } }
Boolean b = hasPermission(new PrincipalSid(a),permission); if(LOGGER.isLoggable(FINER)) LOGGER.finer("hasPermission(PrincipalSID:"+a.getPrincipal()+","+permission+")=>"+b); b = hasPermission(new GrantedAuthoritySid(ga),permission); if(LOGGER.isLoggable(FINER)) LOGGER.finer("hasPermission(GroupSID:"+ga.getAuthority()+","+permission+")=>"+b); b = hasPermission(sid,permission); if(LOGGER.isLoggable(FINER)) LOGGER.finer("hasPermission("+sid+","+permission+")=>"+b);
@Override public boolean hasPermission(Authentication a, Permission permission) { if(a==SYSTEM) { if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>SYSTEM user has full access"); return true; } Boolean b = _hasPermission(a,permission); if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>"+(b==null?"null, thus false":b)); if(b==null) b=false; // default to rejection return b; }
@Override public ACL getACL(Job<?, ?> project) { AuthorizationMatrixProperty amp = project.getProperty(AuthorizationMatrixProperty.class); if (amp != null) { return amp.getACL().newInheritingACL(getRootACL()); } else { return getRootACL(); } }
protected Boolean hasPermission(Sid p, Permission permission) { Boolean b = child.hasPermission(p, permission); if(b!=null) return b; return parent.hasPermission(p,permission); } };
@Override public boolean hasPermission(Authentication a, Permission permission) { if(a==SYSTEM) { if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>SYSTEM user has full access"); return true; } Boolean b = _hasPermission(a,permission); if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>"+(b==null?"null, thus false":b)); if(b==null) b=false; // default to rejection return b; }
@Override public ACL getACL(Job<?,?> project) { AuthorizationMatrixProperty amp = project.getProperty(AuthorizationMatrixProperty.class); if (amp != null) { return amp.getACL().newInheritingACL(getRootACL()); } else { return getRootACL(); } }
protected Boolean hasPermission(Sid p, Permission permission) { Boolean b = child.hasPermission(p, permission); if(b!=null) return b; return parent.hasPermission(p,permission); } };
@Override public boolean hasPermission(Authentication a, Permission permission) { if (a == SYSTEM) { LOGGER.debug("hasPermission({},{})=>SYSTEM user has full access", a, permission); return true; } Boolean b = _hasPermission(a, permission); if (LOGGER.isDebugEnabled()) { LOGGER.debug("hasPermission(" + a + "," + permission + ")=>" + (b == null ? "null, thus false" : b)); } if (b == null) { b = false; // default to rejection } return b; }
/** * Universal function for getting ACL for different * @param roleMapName Name of the role map section * @param itemName Name of the item for patterns * @return ACL */ private ACL getACL(String roleMapName, String itemName, RoleType roleType, AccessControlled item) { SidACL acl; RoleMap roleMap = grantedRoles.get(roleMapName); if (roleMap == null) { acl = getRootACL(); } else { // Create a sub-RoleMap matching the project name, and create an inheriting from root ACL acl = roleMap.newMatchingRoleMap(itemName).getACL(roleType, item).newInheritingACL(getRootACL()); } return acl; }
protected Boolean hasPermission(Sid p, Permission permission) { Boolean b = child.hasPermission(p, permission); if (b != null) { return b; } return parent.hasPermission(p, permission); } };
@Override public boolean hasPermission(@Nonnull Authentication a, Permission permission) { if(a==SYSTEM) { if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>SYSTEM user has full access"); return true; } Boolean b = _hasPermission(a,permission); if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>"+(b==null?"null, thus false":b)); if(b==null) b=false; // default to rejection return b; }
protected Boolean hasPermission(Sid p, Permission permission) { Boolean b = child.hasPermission(p, permission); if(b!=null) return b; return parent.hasPermission(p,permission); } };
@Override public boolean hasPermission(Authentication a, Permission permission) { if(a==SYSTEM) { if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>SYSTEM user has full access"); return true; } Boolean b = _hasPermission(a,permission); if(LOGGER.isLoggable(FINE)) LOGGER.fine("hasPermission("+a+","+permission+")=>"+(b==null?"null, thus false":b)); if(b==null) b=false; // default to rejection return b; }
protected Boolean hasPermission(Sid p, Permission permission) { Boolean b = child.hasPermission(p, permission); if(b!=null) return b; return parent.hasPermission(p,permission); } };
Boolean b = hasPermission(new PrincipalSid(a), permission); if (b != null) { if (LOGGER.isDebugEnabled()) { b = hasPermission(new GrantedAuthoritySid(ga), permission); if (b != null) { if (LOGGER.isDebugEnabled()) { b = hasPermission(sid, permission); if (b != null) { if (LOGGER.isDebugEnabled()) {
Boolean b = hasPermission(new PrincipalSid(a),permission); if(LOGGER.isLoggable(FINER)) LOGGER.finer("hasPermission(PrincipalSID:"+a.getPrincipal()+","+permission+")=>"+b); b = hasPermission(new GrantedAuthoritySid(ga),permission); if(LOGGER.isLoggable(FINER)) LOGGER.finer("hasPermission(GroupSID:"+ga.getAuthority()+","+permission+")=>"+b); b = hasPermission(sid,permission); if(LOGGER.isLoggable(FINER)) LOGGER.finer("hasPermission("+sid+","+permission+")=>"+b);