|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.labels.LabelPermissionSupport
public class LabelPermissionSupport
Performs permission checking for label editing actions
Constructor Summary | |
---|---|
LabelPermissionSupport()
|
Method Summary | |
---|---|
static java.util.List |
filterLabelsByNamespace(java.util.List labelList,
com.atlassian.user.User user,
Namespace namespace)
Takes a list of label objects and filters out those not in the specified namespace |
static java.util.List |
filterVisibleLabels(java.util.List labelList,
com.atlassian.user.User user,
boolean hideSpecialLables)
Takes a list of label objects and filters out those not visible to the given user |
static boolean |
isLabelableByUser(Labelable object,
PermissionManager permissionManager)
Checks that the object permits labels to be edited by the logged in user. |
static boolean |
userCanEditLabel(Label label,
Labelable object,
PermissionManager permissionManager)
|
static boolean |
userCanEditLabel(ParsedLabelName ref,
Labelable object,
PermissionManager permissionManager)
|
static boolean |
userCanViewObject(Labelable object,
PermissionManager permissionManager)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelPermissionSupport()
Method Detail |
---|
public static boolean isLabelableByUser(Labelable object, PermissionManager permissionManager)
object
- - the object to be labelled, if null returns false.permissionManager
- - permission manaager to use
public static boolean userCanEditLabel(ParsedLabelName ref, Labelable object, PermissionManager permissionManager)
public static boolean userCanEditLabel(Label label, Labelable object, PermissionManager permissionManager)
public static boolean userCanViewObject(Labelable object, PermissionManager permissionManager)
public static java.util.List filterVisibleLabels(java.util.List labelList, com.atlassian.user.User user, boolean hideSpecialLables)
labelList
- a list of Label objectsuser
- the User the labels are filtered forhideSpecialLables
- whether to hide special labels, such as favourites
public static java.util.List filterLabelsByNamespace(java.util.List labelList, com.atlassian.user.User user, Namespace namespace)
labelList
- a list of Label objectsuser
- the User the labels are filtered fornamespace
- the Namespace to filter by
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |