|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommentPermissionManager
A unified way of checking whether a user can see a comment or not
| Method Summary | |
|---|---|
boolean |
hasBrowsePermission(Comment comment,
User user)
Deprecated. Use hasBrowsePermission(com.atlassian.crowd.embedded.api.User, Comment). Since v4.3 |
boolean |
hasBrowsePermission(com.atlassian.crowd.embedded.api.User user,
Comment comment)
Return true if the user can see the comment. |
boolean |
hasDeleteAllPermission(User user,
Issue issue)
Returns true if the given User can delete all comments for the given Issue. |
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(User user,
Issue issue)
Returns true if the given User can delete her own comments in 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(User user,
Issue issue)
Returns true if user has permission to edit all 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(User user,
Issue issue)
Returns true if user has permission to edit her own 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(Comment comment,
User user)
Deprecated. Use hasEditPermission(com.atlassian.crowd.embedded.api.User, Comment). Since v4.3 |
boolean |
hasEditPermission(com.atlassian.crowd.embedded.api.User user,
Comment comment)
Determines whether the given user has permission to edit the given comment. |
boolean |
isUserCommentAuthor(User user,
Comment comment)
Returns true if the given user is the author of the 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. |
| Method Detail |
|---|
boolean hasBrowsePermission(Comment comment,
User user)
hasBrowsePermission(com.atlassian.crowd.embedded.api.User, Comment). Since v4.3
comment - commentuser - user
boolean hasBrowsePermission(com.atlassian.crowd.embedded.api.User user,
Comment comment)
user - usercomment - comment
boolean hasEditPermission(Comment comment,
User user)
hasEditPermission(com.atlassian.crowd.embedded.api.User, Comment). Since v4.3
Permissions.COMMENT_EDIT_ALL permission or the
Permissions.COMMENT_EDIT_OWN permission in case the user is the author of the
given comment.
NOTE: The permissions will be determined by the permission scheme associated to the project the comment is
a part of and the entries for the above mentioned permissions.
NOTE: This method does not check whether the Issue the comment belongs to is in an editable workflow state.
comment - commentuser - user
boolean hasEditPermission(com.atlassian.crowd.embedded.api.User user,
Comment comment)
Permissions.COMMENT_EDIT_ALL permission or the
Permissions.COMMENT_EDIT_OWN permission in case the user is the author of the
given comment.
NOTE: The permissions will be determined by the permission scheme associated to the project the comment is
a part of and the entries for the above mentioned permissions.
NOTE: This method does not check whether the Issue the comment belongs to is in an editable workflow state.
user - usercomment - comment
boolean hasEditAllPermission(User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean hasEditAllPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean hasEditOwnPermission(User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean hasEditOwnPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean hasDeleteAllPermission(User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean hasDeleteAllPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean hasDeleteOwnPermission(User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean hasDeleteOwnPermission(com.atlassian.crowd.embedded.api.User user,
Issue issue)
user - User. A null value represents an anonymous User.issue - Issue. Must not be null.
boolean isUserCommentAuthor(User user,
Comment comment)
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.
user - The User. Can be null to represent current user is not logged in (anonymous).comment - The Comment. Cannot be null.
boolean isUserCommentAuthor(com.atlassian.crowd.embedded.api.User user,
Comment comment)
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.
user - The User. Can be null to represent current user is not logged in (anonymous).comment - The Comment. Cannot be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||