public class AuthorizationHelper extends Object
Constructor and Description |
---|
AuthorizationHelper(StorageProviderFactory storageProviderFactory) |
Modifier and Type | Method and Description |
---|---|
Collection<org.springframework.security.core.GrantedAuthority> |
getAuthorities(org.springframework.security.core.Authentication auth) |
Map<String,AclType> |
getSpaceACLs(String storeId,
String spaceId) |
protected DuracloudUserDetails |
getUserDetails(org.springframework.security.core.Authentication auth) |
List<String> |
getUserGroups(org.springframework.security.core.Authentication auth) |
boolean |
groupsHaveAccess(List<String> userGroups,
Map<String,AclType> acls,
boolean isRead) |
boolean |
groupsHaveReadAccess(org.springframework.security.core.Authentication auth,
Map<String,AclType> acls) |
boolean |
groupsHaveReadAccess(List<String> userGroups,
Map<String,AclType> acls) |
boolean |
groupsHaveWriteAccess(List<String> userGroups,
Map<String,AclType> acls) |
boolean |
hasAdmin(org.springframework.security.core.Authentication auth) |
boolean |
hasReadAccess(String name,
Map<String,AclType> acls) |
boolean |
hasRole(org.springframework.security.core.Authentication auth,
String role) |
boolean |
hasRole(String role,
Collection<org.springframework.security.core.GrantedAuthority> authorities) |
boolean |
hasWriteAccess(String name,
Map<String,AclType> acls) |
public AuthorizationHelper(StorageProviderFactory storageProviderFactory)
public List<String> getUserGroups(org.springframework.security.core.Authentication auth)
protected DuracloudUserDetails getUserDetails(org.springframework.security.core.Authentication auth)
public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities(org.springframework.security.core.Authentication auth)
public boolean groupsHaveReadAccess(org.springframework.security.core.Authentication auth, Map<String,AclType> acls)
public boolean groupsHaveReadAccess(List<String> userGroups, Map<String,AclType> acls)
public boolean groupsHaveWriteAccess(List<String> userGroups, Map<String,AclType> acls)
public boolean groupsHaveAccess(List<String> userGroups, Map<String,AclType> acls, boolean isRead)
public boolean hasRole(org.springframework.security.core.Authentication auth, String role)
public boolean hasAdmin(org.springframework.security.core.Authentication auth)
public boolean hasRole(String role, Collection<org.springframework.security.core.GrantedAuthority> authorities)
Copyright © 2009–2016 DuraSpace. All rights reserved.