public class DefaultProjectFieldScreenHelper extends Object implements ProjectFieldScreenHelper
ProjectFieldScreenHelper.FieldsScreenPermission
Constructor and Description |
---|
DefaultProjectFieldScreenHelper(ProjectWorkflowSchemeHelper projectWorkflowSchemeHelper,
ProjectIssueTypeScreenSchemeHelper issueTypeScreenSchemeHelper,
WorkflowManager workflowManager,
FieldScreenSchemeManager fieldScreenSchemeManager,
PermissionManager permissionManager,
GlobalPermissionManager globalPermissionManager,
FieldScreenManager fieldScreenManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
canUserEditScreen(ApplicationUser user,
FieldScreen screen)
Determines whether given user can edit given screen without any context being given
|
boolean |
canUserViewFieldScreenForProject(ApplicationUser user,
FieldScreen fieldScreen,
Project project)
Whether the provided user can view the field screen for the project.
|
List<Project> |
getAllProjectsForFieldScreen(FieldScreen fieldScreen)
Gets the projects using a given
FieldScreen . |
List<Project> |
getProjectsForFieldScreen(FieldScreen fieldScreen)
Gets the projects using a given
FieldScreen . |
ProjectFieldScreenHelper.FieldsScreenPermission |
getUserEditScreenPermission(ApplicationUser user,
FieldScreen screen)
Determines whether given user can edit given screen
|
public DefaultProjectFieldScreenHelper(ProjectWorkflowSchemeHelper projectWorkflowSchemeHelper, ProjectIssueTypeScreenSchemeHelper issueTypeScreenSchemeHelper, WorkflowManager workflowManager, FieldScreenSchemeManager fieldScreenSchemeManager, PermissionManager permissionManager, GlobalPermissionManager globalPermissionManager, FieldScreenManager fieldScreenManager)
public List<Project> getProjectsForFieldScreen(FieldScreen fieldScreen)
ProjectFieldScreenHelper
FieldScreen
. A project uses a given FieldScreen
if it:
FieldScreen
as a transition screen, orFieldScreen
for one of its issue operations
Only projects for which the requesting user has ProjectAction.EDIT_PROJECT_CONFIG
permissions are returned.
getProjectsForFieldScreen
in interface ProjectFieldScreenHelper
fieldScreen
- field screen to find associated projects for.ProjectNameComparator.COMPARATOR
public List<Project> getAllProjectsForFieldScreen(FieldScreen fieldScreen)
ProjectFieldScreenHelper
FieldScreen
. A project uses a given FieldScreen
if it:
FieldScreen
as a transition screen, orFieldScreen
for one of its issue operationsThis method return all projects existing on instance, also projects which should not be visible for the user.
getAllProjectsForFieldScreen
in interface ProjectFieldScreenHelper
fieldScreen
- field screen to find associated projects for.ProjectNameComparator.COMPARATOR
public boolean canUserViewFieldScreenForProject(ApplicationUser user, FieldScreen fieldScreen, Project project)
ProjectFieldScreenHelper
canUserViewFieldScreenForProject
in interface ProjectFieldScreenHelper
user
- the user to check to access for. Must not be null.fieldScreen
- the field screen to query view access on. Must not be null.project
- the project the field screen should be on. Must not be null.public boolean canUserEditScreen(ApplicationUser user, FieldScreen screen)
ProjectFieldScreenHelper
canUserEditScreen
in interface ProjectFieldScreenHelper
user
- the user to check access forscreen
- the screen being editedpublic ProjectFieldScreenHelper.FieldsScreenPermission getUserEditScreenPermission(ApplicationUser user, FieldScreen screen)
ProjectFieldScreenHelper
getUserEditScreenPermission
in interface ProjectFieldScreenHelper
user
- the user to check access forscreen
- the screen being editedCopyright © 2002-2021 Atlassian. All Rights Reserved.