| Public Methods | 
	 
    
        | 
            
            @Nonnull
            
            
            
            
            
            
            Page<String>
         | 
        
        getGrantedGroups(Permission permission, PageRequest request)
        
         Get the groups which are granted a permission 
  
   | 
	 
    
        | 
            
            @Nonnull
            
            
            
            
            
            
            Page<ApplicationUser>
         | 
        
        getGrantedUsers(Permission permission, PageRequest request)
        
         Get the users which are granted a permission 
  
   | 
	 
    
        | 
            
            @Nullable
            
            
            
            
            
            
            Permission
         | 
        
        getHighestGlobalGroupPermission(String groupName)
        
         Get the highest global permission for a group. 
  
   | 
	 
    
        | 
            
            @Nullable
            
            
            
            
            
            
            Permission
         | 
        
        getHighestGlobalPermission(ApplicationUser user)
        
         Get the highest global permission for a user. 
  
   | 
	 
    
        | 
            
            @Nullable
            
            
            
            
            
            
            Permission
         | 
        
        getHighestGlobalPermission(String username)
        
         Get the highest global permission for a user. 
  
   | 
	 
    
        | 
            
            @Nonnull
            
            
            
            
            
            
            Set<String>
         | 
        
        getUsersWithPermission(Permission permission)
        
         Get the usernames of the users with the given permission (whether directly or though permission inheritance)
 This includes users granted the permission directly and those who have the permission through their group
 membership. 
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasAnyUserPermission(ApplicationUser user, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasAnyUserPermission(Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasDirectGlobalUserPermission(Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasDirectProjectUserPermission(Project project, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasDirectRepositoryUserPermission(Repository repository, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasGlobalGroupPermission(Permission permission, String group)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasGlobalPermission(Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasGlobalPermission(ApplicationUser user, Permission permission)
        
        Will return true if the user is  active and one of the following conditions
  is met:
   
      - permission is granted directly for the given user
 
      - permission is granted to a group the given user is a member of
 
    
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasGlobalPermission(String username, Permission permission)
        
        Will return true if the user is  active and one of the following conditions
  is met:
   
      - permission is granted directly for the given user
 
      - permission is granted to a group the given user is a member of
 
    
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasGlobalPermissionThroughGroupMembership(Permission permission, Set<String> excludedGroups)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasProjectPermission(Project project, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasProjectPermission(ApplicationUser user, Project project, Permission permission)
        
        Will return true if the user is  active and one of the following conditions
 is met:
  
     - permission is granted directly for the given user on the given project
 
     - permission is granted for all logged in users on the given project
 
     - permission is granted to a group the given user is a member of on the given project
 
     - The given user is directly granted a permission on at least one repository within the given project
     and the given permission is implied as a result
 
     - A group the given user is a member of is granted a permission on at least one repository within the
         given project and the given permission is implied as a result
 
     - The given project is 
publicly accessible and the permission is
         implied as a result 
     - the given user is directly granted 
administration rights 
     - A group the given user is a member of is granted 
administration rights 
   
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasProjectPermission(int projectId, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasProjectPermission(ApplicationUser user, int projectId, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasProjectPermissionThroughGroupMembership(Project project, Permission permission, Set<String> excludedGroups)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasRepositoryPermission(ApplicationUser user, int repositoryId, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasRepositoryPermission(Repository repository, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasRepositoryPermission(int repositoryId, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasRepositoryPermission(ApplicationUser user, Repository repository, Permission permission)
        
        Will return true if the user is  active and one of the following conditions
 is met:
  
     - permission is granted directly for the given user on the given repository
 
     - permission is granted to a group the given user is a member of on the given repository
 
     - The given user is directly granted a permission on the containing project and the given permission is
         implied as a result
 
     - A group the given user is a member of is granted a permission on the containing project and the given
         permission is implied as a result
 
     - All logged in users are granted a permission to the containing project and the given permission is
         implied as a result
 
     - The given repository is 
publicly accessible and the permission
         is implied as a result 
     - the given user is directly granted 
administration rights 
     - A group the given user is a member of is granted 
administration rights 
  
 This method will always return  false if the  user given is  null as
 anonymous users cannot be granted permissions by definition.  
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasRepositoryPermissionThroughGroupMembership(Repository repository, Permission permission, Set<String> excludedGroups)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasUserPermission(ApplicationUser user, ApplicationUser targetUser, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasUserPermission(ApplicationUser targetUser, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasUserPermission(int targetUserId, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasUserPermission(Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        hasUserPermission(ApplicationUser user, int targetUserId, Permission permission)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        isProjectAccessible(int projectId)
        
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        isProjectAccessible(Project project)
        
         Retrieve whether the current user (authenticated or not) has access to the given project. 
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        isPubliclyAccessible(Repository repository)
        
         Retrieves whether the repository is publicly accessible. 
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        isPubliclyAccessible(Project project)
        
         Retrieves whether the project is publicly accessible. 
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        isRepositoryAccessible(Repository repository)
        
         Retrieve whether the current user (authenticated or not) has access to the given repository. 
  
   | 
	 
    
        | 
            
            
            
            
            
            
            boolean
         | 
        
        isRepositoryAccessible(int repositoryId)
        
   |