Class UpdateReferenceFilePermission
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.security.permissions.RepositoryBackedPermission<ReferenceFile,java.lang.Long>
-
- ca.corefacility.bioinformatics.irida.security.permissions.files.UpdateReferenceFilePermission
-
- All Implemented Interfaces:
BasePermission<ReferenceFile>
@Component public class UpdateReferenceFilePermission extends RepositoryBackedPermission<ReferenceFile,java.lang.Long>
Confirms that the authenticated user is allowed to modify a reference file.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PERMISSION_PROVIDED
-
Constructor Summary
Constructors Constructor Description UpdateReferenceFilePermission(ReferenceFileRepository referenceFileRepository, ProjectReferenceFileJoinRepository prfRepository, ProjectOwnerPermission projectOwnerPermission)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
customPermissionAllowed(org.springframework.security.core.Authentication authentication, ReferenceFile 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
-
-
-
-
Field Detail
-
PERMISSION_PROVIDED
public static final java.lang.String PERMISSION_PROVIDED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UpdateReferenceFilePermission
@Autowired public UpdateReferenceFilePermission(ReferenceFileRepository referenceFileRepository, ProjectReferenceFileJoinRepository prfRepository, ProjectOwnerPermission projectOwnerPermission)
-
-
Method Detail
-
getPermissionProvided
public java.lang.String getPermissionProvided()
Description copied from interface:BasePermission
Get the implementation-specific permission provided.- Returns:
- the permission provided by the permission class.
-
customPermissionAllowed
protected boolean customPermissionAllowed(org.springframework.security.core.Authentication authentication, ReferenceFile targetDomainObject)
This method is called byRepositoryBackedPermission
to evaluate the custom permissions provided by implementing classes.- Specified by:
customPermissionAllowed
in classRepositoryBackedPermission<ReferenceFile,java.lang.Long>
- Parameters:
authentication
- the authenticated user.targetDomainObject
- the object that the user is attempting to access.- Returns:
- true if permitted, false otherwise.
-
-