com.atlassian.jira.sharing.type
Class ProjectShareTypeValidator
java.lang.Object
com.atlassian.jira.sharing.type.ProjectShareTypeValidator
- All Implemented Interfaces:
- ShareTypeValidator
public class ProjectShareTypeValidator
- extends Object
- implements ShareTypeValidator
Validator for ProjectShareType
- Since:
- v3.13
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProjectShareTypeValidator
public ProjectShareTypeValidator(PermissionManager permissionManager,
ProjectManager projectManager,
ProjectRoleManager projectRoleManager)
checkSharePermission
public 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.
- Specified by:
checkSharePermission
in interface ShareTypeValidator
- Parameters:
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 optional
- Returns:
- true if the usr passes the above criteria, false otherwise.
checkSearchParameter
public boolean checkSearchParameter(JiraServiceContext serviceCtx,
ShareTypeSearchParameter searchParameter)
- Description copied from interface:
ShareTypeValidator
- Check to see if the passed SearchParameter is valid for the ShareType.
- Specified by:
checkSearchParameter
in interface ShareTypeValidator
- Parameters:
serviceCtx
- Context containing the user that is to store the SharePermission, the i18n bean and an ErrorCollection
searchParameter
- the parameter is check.
- Returns:
- true if the parameter is valid or false otherwise.
Copyright © 2002-2014 Atlassian. All Rights Reserved.