public class ProjectShareTypeValidator extends Object implements ShareTypeValidator
ProjectShareType
DELEGATED_ERROR_KEY, ERROR_KEY
Constructor and Description |
---|
ProjectShareTypeValidator(PermissionManager permissionManager,
ProjectManager projectManager,
ProjectRoleManager projectRoleManager,
FeatureManager featureManager,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkSearchParameter(JiraServiceContext serviceCtx,
ShareTypeSearchParameter searchParameter)
Check to see if the passed SearchParameter is valid for the ShareType.
|
boolean |
checkSharePermission(JiraServiceContext ctx,
SharePermission permission)
checks that the user has browse permission for the given project if no role is given, else checks that the
user is part of that role for the given project.
|
public ProjectShareTypeValidator(PermissionManager permissionManager, ProjectManager projectManager, ProjectRoleManager projectRoleManager, FeatureManager featureManager, com.atlassian.event.api.EventPublisher eventPublisher)
public boolean checkSharePermission(JiraServiceContext ctx, SharePermission permission)
checkSharePermission
in interface ShareTypeValidator
ctx
- The service context that contains the user trying to store permissions, the i18n bean and the error collectionpermission
- The permission to check. Must have project, and role is optionalpublic boolean checkSearchParameter(JiraServiceContext serviceCtx, ShareTypeSearchParameter searchParameter)
ShareTypeValidator
checkSearchParameter
in interface ShareTypeValidator
serviceCtx
- Context containing the user that is to store the SharePermission, the i18n bean and an ErrorCollection
searchParameter
- the parameter is check.Copyright © 2002-2023 Atlassian. All Rights Reserved.