Class UpdateSamplePermission
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.security.permissions.RepositoryBackedPermission<Sample,java.lang.Long>
-
- ca.corefacility.bioinformatics.irida.security.permissions.sample.UpdateSamplePermission
-
- All Implemented Interfaces:
BasePermission<Sample>
@Component public class UpdateSamplePermission extends RepositoryBackedPermission<Sample,java.lang.Long>
Custom permission implementation for updatingSample
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UpdateSamplePermission(SampleRepository sampleRepository, ProjectOwnerPermission projectOwnerPermission, ProjectSampleJoinRepository projectSampleJoinRepository)
Constructs a new instance ofUpdateSamplePermission
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
customPermissionAllowed(org.springframework.security.core.Authentication authentication, Sample targetDomainObject)
This method is called byRepositoryBackedPermission
to evaluate the custom permissions provided by implementing classes.java.lang.String
getPermissionProvided()
Get the implementation-specific permission provided.-
Methods inherited from class ca.corefacility.bioinformatics.irida.security.permissions.RepositoryBackedPermission
adminAccessAllowed, isAllowed
-
-
-
-
Constructor Detail
-
UpdateSamplePermission
@Autowired protected UpdateSamplePermission(SampleRepository sampleRepository, ProjectOwnerPermission projectOwnerPermission, ProjectSampleJoinRepository projectSampleJoinRepository)
Constructs a new instance ofUpdateSamplePermission
.- Parameters:
sampleRepository
- the sample repositoryprojectOwnerPermission
- the project owner permissionprojectSampleJoinRepository
- the project sample join repository
-
-
Method Detail
-
getPermissionProvided
public java.lang.String getPermissionProvided()
Get the implementation-specific permission provided.- Returns:
- the permission provided by the permission class.
-
customPermissionAllowed
protected boolean customPermissionAllowed(org.springframework.security.core.Authentication authentication, Sample targetDomainObject)
This method is called byRepositoryBackedPermission
to evaluate the custom permissions provided by implementing classes.- Specified by:
customPermissionAllowed
in classRepositoryBackedPermission<Sample,java.lang.Long>
- Parameters:
authentication
- the authenticated user.targetDomainObject
- the object that the user is attempting to access.- Returns:
- true if permitted, false otherwise.
-
-