public class RefControl extends Object
Modifier and Type | Method and Description |
---|---|
RefControl |
forUser(CurrentUser who) |
ProjectControl |
getProjectControl() |
String |
getRefName() |
CurrentUser |
getUser() |
boolean |
hasReadPermissionOnRef(boolean allowNoteDbRefs)
Returns
true if the user has permission to read the ref. |
boolean |
isBlocked(String permissionName)
True if the user is blocked from using this permission.
|
boolean |
isEditVisible()
Can this user see other users change edits?
|
boolean |
isOwner()
Is this user a ref owner?
|
public String getRefName()
public ProjectControl getProjectControl()
public CurrentUser getUser()
public RefControl forUser(CurrentUser who)
public boolean isOwner()
public boolean hasReadPermissionOnRef(boolean allowNoteDbRefs)
true
if the user has permission to read the ref. This method evaluates RefPermission.READ
only. Hence, it is not authoritative. For example, it does not tell if the
user can see NoteDb refs such as refs/meta/external-ids
which requires GlobalPermission#ACCESS_DATABASE
and deny access in this case.public boolean isEditVisible()
public boolean isBlocked(String permissionName)