public class DefaultInternalProjectPermissionHelper extends Object implements InternalProjectPermissionHelper
Constructor and Description |
---|
DefaultInternalProjectPermissionHelper(PermissionManager permissionManager,
ApplicationProperties applicationProperties) |
Modifier and Type | Method and Description |
---|---|
boolean |
canUserBrowseProject(Project project,
ApplicationUser user)
Checks if the user can see the projects.
|
List<Project> |
getBrowsableProjectHistory(ApplicationUser user)
Gets the history of projects that should be visible for the user based on 'BROWSE_PROJECTS' permission checks.
|
Collection<Project> |
getBrowsableProjects(ApplicationUser user)
Gets the list of projects that should be visible for the user based on 'BROWSE_PROJECTS' permission checks.
|
ServiceOutcome<List<Project>> |
getBrowsableProjectsForProjectAction(ApplicationUser user)
Gets the list of projects that should be visible for the user based on
ProjectAction . |
Collection<Project> |
getBrowsableProjectsInCategory(ApplicationUser user,
ProjectCategory projectCategory)
Gets the list of projects from a given category that should be visible for the user based on 'BROWSE_PROJECTS' permission checks.
|
boolean |
hasPermission(ProjectPermissionKey permissionKey,
Project project,
ApplicationUser user)
Permission checker method that differentiates the behaviour only for 'BROWSE_PROJECTS'.
|
public DefaultInternalProjectPermissionHelper(PermissionManager permissionManager, ApplicationProperties applicationProperties)
public boolean canUserBrowseProject(Project project, ApplicationUser user)
InternalProjectPermissionHelper
canUserBrowseProject
in interface InternalProjectPermissionHelper
project
- Project to check for 'BROWSE_PROJECTS'.user
- User to check the permissions for.public boolean hasPermission(ProjectPermissionKey permissionKey, Project project, ApplicationUser user)
InternalProjectPermissionHelper
hasPermission
in interface InternalProjectPermissionHelper
permissionKey
- Permission that's being checked.project
- Project against which the permission is tested.user
- User to check the permissions for.public Collection<Project> getBrowsableProjects(ApplicationUser user)
InternalProjectPermissionHelper
getBrowsableProjects
in interface InternalProjectPermissionHelper
user
- User to check the permissions for.public ServiceOutcome<List<Project>> getBrowsableProjectsForProjectAction(ApplicationUser user)
InternalProjectPermissionHelper
ProjectAction
.
Differentiating based on the FF.getBrowsableProjectsForProjectAction
in interface InternalProjectPermissionHelper
user
- User to check the permissions for.public Collection<Project> getBrowsableProjectsInCategory(ApplicationUser user, ProjectCategory projectCategory)
InternalProjectPermissionHelper
getBrowsableProjectsInCategory
in interface InternalProjectPermissionHelper
user
- User to check the permissions for.projectCategory
- Category to get the projects from.public List<Project> getBrowsableProjectHistory(ApplicationUser user)
InternalProjectPermissionHelper
getBrowsableProjectHistory
in interface InternalProjectPermissionHelper
user
- User to check the permissions for.Copyright © 2002-2022 Atlassian. All Rights Reserved.