Class Overview
Performs permission checking for label editing actions
Summary
Public Methods |
static
List
|
filterLabelsByNamespace(List labelList, User user, Namespace namespace)
Takes a list of label objects and filters out those not in the specified namespace
|
static
List
|
filterVisibleLabels(List labelList, 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(ParsedLabelName ref, Labelable object, PermissionManager permissionManager)
|
static
boolean
|
userCanEditLabel(Label label, Labelable object, PermissionManager permissionManager)
|
static
boolean
|
userCanViewObject(Labelable object, PermissionManager permissionManager)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
LabelPermissionSupport
()
Public Methods
public
static
List
filterLabelsByNamespace
(List labelList, User user, Namespace namespace)
Takes a list of label objects and filters out those not in the specified namespace
Parameters
labelList
| a list of Label objects |
user
| the User the labels are filtered for |
namespace
| the Namespace to filter by |
Returns
- a filtered list of Label objects
public
static
List
filterVisibleLabels
(List labelList, User user, boolean hideSpecialLables)
Takes a list of label objects and filters out those not visible to the given user
Parameters
labelList
| a list of Label objects |
user
| the User the labels are filtered for |
hideSpecialLables
| whether to hide special labels, such as favourites |
Returns
- a filtered list of Label objects
public
static
boolean
isLabelableByUser
(Labelable object, PermissionManager permissionManager)
Checks that the object permits labels to be edited by the logged in user.
Parameters
object
| - the object to be labelled, if null returns false. |
permissionManager
| - permission manaager to use |