com.atlassian.jira.sharing.type
Class ProjectShareTypePermissionChecker

java.lang.Object
  extended by com.atlassian.jira.sharing.type.ProjectShareTypePermissionChecker
All Implemented Interfaces:
ShareTypePermissionChecker

public class ProjectShareTypePermissionChecker
extends Object
implements ShareTypePermissionChecker

Permission checker for the ProjectShareType

Since:
v3.13

Constructor Summary
ProjectShareTypePermissionChecker(ProjectManager projectManager, PermissionManager permissionManager, ProjectRoleManager projectRoleManager)
           
 
Method Summary
 boolean hasPermission(com.atlassian.crowd.embedded.api.User user, SharePermission permission)
          If a role has been passed in, checks to see if the user is in that role for the given project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectShareTypePermissionChecker

public ProjectShareTypePermissionChecker(ProjectManager projectManager,
                                         PermissionManager permissionManager,
                                         ProjectRoleManager projectRoleManager)
Method Detail

hasPermission

public boolean hasPermission(com.atlassian.crowd.embedded.api.User user,
                             SharePermission permission)
If a role has been passed in, checks to see if the user is in that role for the given project. If no role has been given, it checks to see if the user has browse permission for the project.

Specified by:
hasPermission in interface ShareTypePermissionChecker
Parameters:
user - The user to check permissions for.
permission - the permission to check against. Must have a project, role is optional.
Returns:
true if the above criteria is true, else false.


Copyright © 2002-2013 Atlassian. All Rights Reserved.