Class ReadProjectMetadataResponsePermission
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.security.permissions.metadata.ReadProjectMetadataResponsePermission
-
- All Implemented Interfaces:
BasePermission<ProjectMetadataResponse>
@Component public class ReadProjectMetadataResponsePermission extends java.lang.Object implements BasePermission<ProjectMetadataResponse>
Permission for checking that a user should have access to the givenMetadataTemplateField
s in aProjectMetadataResponse
. This will check the user's role on the project and whether they're in a group.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PERMISSION_PROVIDED
-
Constructor Summary
Constructors Constructor Description ReadProjectMetadataResponsePermission(UserRepository userRepository, ProjectUserJoinRepository projectUserJoinRepository, UserGroupProjectJoinRepository userGroupProjectJoinRepository, MetadataRestrictionRepository metadataRestrictionRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPermissionProvided()
Get the implementation-specific permission provided.boolean
isAllowed(org.springframework.security.core.Authentication authentication, java.lang.Object targetDomainObject)
Is the authenticated user allowed to perform some action on the target domain object?
-
-
-
Field Detail
-
PERMISSION_PROVIDED
public static final java.lang.String PERMISSION_PROVIDED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReadProjectMetadataResponsePermission
@Autowired public ReadProjectMetadataResponsePermission(UserRepository userRepository, ProjectUserJoinRepository projectUserJoinRepository, UserGroupProjectJoinRepository userGroupProjectJoinRepository, MetadataRestrictionRepository metadataRestrictionRepository)
-
-
Method Detail
-
getPermissionProvided
public java.lang.String getPermissionProvided()
Description copied from interface:BasePermission
Get the implementation-specific permission provided.- Specified by:
getPermissionProvided
in interfaceBasePermission<ProjectMetadataResponse>
- Returns:
- the permission provided by the permission class.
-
isAllowed
public boolean isAllowed(org.springframework.security.core.Authentication authentication, java.lang.Object targetDomainObject)
Description copied from interface:BasePermission
Is the authenticated user allowed to perform some action on the target domain object?- Specified by:
isAllowed
in interfaceBasePermission<ProjectMetadataResponse>
- Parameters:
authentication
- the authenticated user.targetDomainObject
- the object the user is requesting to perform an action on.- Returns:
- true if the action is allowed, false otherwise.
-
-