|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.comments.DefaultCommentPermissionManager
public class DefaultCommentPermissionManager
This permission manager is responsible to check and grant browse and edit permissions to users over issue comments.
Constructor Summary | |
---|---|
DefaultCommentPermissionManager(ProjectRoleManager projectRoleManager,
PermissionManager permissionManager,
GroupManager groupManager)
|
Method Summary | |
---|---|
boolean |
hasBrowsePermission(com.atlassian.crowd.embedded.api.User user,
Comment comment)
Determines whether the user can see given comment. |
boolean |
hasDeleteAllPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Returns true if the given User can delete all comments for the given Issue. |
boolean |
hasDeleteOwnPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Returns true if the given User can delete her own comments in the given Issue. |
boolean |
hasEditAllPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Returns true if user has permission to edit all comments in the given Issue. |
boolean |
hasEditOwnPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Returns true if user has permission to edit her own comments in the given Issue. |
boolean |
hasEditPermission(com.atlassian.crowd.embedded.api.User user,
Comment comment)
Determines whether the user can edit given comment. |
boolean |
isUserCommentAuthor(com.atlassian.crowd.embedded.api.User user,
Comment comment)
Returns true if the given user is the author of the given comment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultCommentPermissionManager(ProjectRoleManager projectRoleManager, PermissionManager permissionManager, GroupManager groupManager)
Method Detail |
---|
public boolean hasBrowsePermission(com.atlassian.crowd.embedded.api.User user, Comment comment)
hasBrowsePermission
in interface CommentPermissionManager
user
- usercomment
- comment
public boolean hasEditPermission(com.atlassian.crowd.embedded.api.User user, Comment comment)
hasEditPermission
in interface CommentPermissionManager
user
- usercomment
- comment to edit
public boolean isUserCommentAuthor(com.atlassian.crowd.embedded.api.User user, Comment comment)
CommentPermissionManager
If the given Comment has a null author, this represents that it was created anonymously, and no-one is the author (returns false). If the given User is null, then this represents that the current user is anonymous, and the method will always return false.
isUserCommentAuthor
in interface CommentPermissionManager
user
- The User. Can be null to represent current user is not logged in (anonymous).comment
- The Comment. Cannot be null.
public boolean hasEditAllPermission(com.atlassian.crowd.embedded.api.User user, Issue issue)
CommentPermissionManager
hasEditAllPermission
in interface CommentPermissionManager
user
- User. A null value represents an anonymous User.issue
- Issue. Must not be null.
public boolean hasEditOwnPermission(com.atlassian.crowd.embedded.api.User user, Issue issue)
CommentPermissionManager
hasEditOwnPermission
in interface CommentPermissionManager
user
- User. A null value represents an anonymous User.issue
- Issue. Must not be null.
public boolean hasDeleteAllPermission(com.atlassian.crowd.embedded.api.User user, Issue issue)
CommentPermissionManager
hasDeleteAllPermission
in interface CommentPermissionManager
user
- User. A null value represents an anonymous User.issue
- Issue. Must not be null.
public boolean hasDeleteOwnPermission(com.atlassian.crowd.embedded.api.User user, Issue issue)
CommentPermissionManager
hasDeleteOwnPermission
in interface CommentPermissionManager
user
- User. A null value represents an anonymous User.issue
- Issue. Must not be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |