com.atlassian.jira.issue.comments
Class DefaultCommentPermissionManager
java.lang.Object
com.atlassian.jira.issue.comments.DefaultCommentPermissionManager
- All Implemented Interfaces:
- CommentPermissionManager
public class DefaultCommentPermissionManager
- extends Object
- implements CommentPermissionManager
This permission manager is responsible to check and grant browse and edit
permissions to users over issue comments.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCommentPermissionManager
public DefaultCommentPermissionManager(ProjectRoleManager projectRoleManager,
PermissionManager permissionManager)
hasBrowsePermission
public boolean hasBrowsePermission(Comment comment,
User user)
- Determines whether the user can see given comment.
User can see the comment if comment does not have restricted visibility,
otherwise only if the user is in either comments group or project role
visibility level.
- Specified by:
hasBrowsePermission
in interface CommentPermissionManager
- Parameters:
comment
- commentuser
- user
- Returns:
- true if user can see the comment, false otherwise
hasEditPermission
public boolean hasEditPermission(Comment comment,
User user)
- Determines whether the user can edit given comment.
User can edit the given comment if he can edit all comment
of the associated issue or is the author of this comment
and has edit own comments permission granted.
- Specified by:
hasEditPermission
in interface CommentPermissionManager
- Parameters:
comment
- comment to edituser
- user
- Returns:
- true if user can edit the given comment, false otherwise
Copyright © 2002-2008 Atlassian. All Rights Reserved.