@Override public boolean isAccessAllowed(Class<?> componentClass, Authentication authentication) { if (GeoServerSecuredPage.class.isAssignableFrom(componentClass)) { return super.isAccessAllowed(componentClass, authentication); } return true; } }
public boolean isAccessAllowed(Class componentClass, Authentication authentication) { if (authentication == null) { return false; } return getSecurityManager().checkAuthenticationForAdminRole(authentication); }
@Override public boolean isAccessAllowed(Class componentClass, Authentication authentication) { if (GeoServerSecuredPage.class.isAssignableFrom(componentClass)) { return super.isAccessAllowed(componentClass, authentication); } return true; } }
public boolean isAccessAllowed(Class<?> componentClass, Authentication authentication) { return getSecurityManager().checkAuthenticationForAdminRole(authentication); }
@Override public boolean isAccessAllowed(Class componentClass, Authentication authentication) { //full admin implies group admin if (super.isAccessAllowed(componentClass, authentication)) { return true; } return getSecurityManager() .checkAuthenticationForRole(authentication, GeoServerRole.GROUP_ADMIN_ROLE); } }
@Override public boolean isAccessAllowed(Class componentClass, Authentication authentication) { // full admin implies group admin if (super.isAccessAllowed(componentClass, authentication)) { return true; } return getSecurityManager() .checkAuthenticationForRole(authentication, GeoServerRole.GROUP_ADMIN_ROLE); } }
@Override public boolean isAccessAllowed(Class componentClass, Authentication authentication) { //if full admin grant access if (super.isAccessAllowed(componentClass, authentication)) { return true; } //if not authenticated deny access if (authentication == null || !authentication.isAuthenticated()) { return false; } //TODO: we should cache this result somehow List<String> roles = lookupWorkspaceAdminRoles(); for (GrantedAuthority auth : authentication.getAuthorities()) { if (roles.contains(auth.getAuthority())) { return true; } } return false; }
@Override public boolean isAccessAllowed(Class componentClass, Authentication authentication) { //full admin implies group admin if (super.isAccessAllowed(componentClass, authentication)) { return true; } return getSecurityManager() .checkAuthenticationForRole(authentication, GeoServerRole.GROUP_ADMIN_ROLE); } }
@Override public boolean isAccessAllowed(Class<?> componentClass, Authentication authentication) { // if full admin grant access if (super.isAccessAllowed(componentClass, authentication)) { return true; } // if not authenticated deny access if (authentication == null || !authentication.isAuthenticated()) { return false; } // TODO: we should cache this result somehow if (isWorkspaceAdmin(authentication)) { return true; } return false; }