Class ProjectOwnerPermission

    • Method Detail

      • customPermissionAllowed

        public boolean customPermissionAllowed​(org.springframework.security.core.Authentication authentication,
                                               Project p)
        This method is called by RepositoryBackedPermission to evaluate the custom permissions provided by implementing classes.
        Overrides:
        customPermissionAllowed in class ModifyProjectPermission
        Parameters:
        authentication - the authenticated user.
        p - the object that the user is attempting to access.
        Returns:
        true if permitted, false otherwise.
      • adminAccessAllowed

        protected boolean adminAccessAllowed​(org.springframework.security.core.Authentication authentication,
                                             java.lang.Object targetDomainObject)
        Check whether admins should be quick-approved for this permission. This may be overridden for special cases
        Overrides:
        adminAccessAllowed in class RepositoryBackedPermission<Project,​java.lang.Long>
        Parameters:
        authentication - The authentication of the logged in user
        targetDomainObject - the object that is being acted on
        Returns:
        true of the admin should be approved
      • 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.
      • canUpdateRemoteObject

        public boolean canUpdateRemoteObject​(java.lang.Object object,
                                             org.springframework.security.core.Authentication authentication)
        Check if the given object is a remote object, and if so if the authentication is a ProjectSynchronizationAuthenticationToken object
        Parameters:
        object - the object to test
        authentication - the authentication to test
        Returns:
        true if either the object is not remote, or if it is remote and the authentication is a ProjectSynchronizationAuthenticationToken