Class UpdateSamplePermission

    • Constructor Detail

      • UpdateSamplePermission

        @Autowired
        protected UpdateSamplePermission​(SampleRepository sampleRepository,
                                         ProjectOwnerPermission projectOwnerPermission,
                                         ProjectSampleJoinRepository projectSampleJoinRepository)
        Constructs a new instance of UpdateSamplePermission.
        Parameters:
        sampleRepository - the sample repository
        projectOwnerPermission - the project owner permission
        projectSampleJoinRepository - 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 by RepositoryBackedPermission to evaluate the custom permissions provided by implementing classes.
        Specified by:
        customPermissionAllowed in class RepositoryBackedPermission<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.