@Deprecated public class XWikiRightServiceImpl extends Object implements XWikiRightService
XWikiRightService.| Modifier and Type | Field and Description |
|---|---|
static EntityReference |
GLOBALRIGHTCLASS_REFERENCE
Deprecated.
|
static EntityReference |
RIGHTCLASS_REFERENCE
Deprecated.
|
ALLGROUP_GROUP, ALLGROUP_GROUP_FULLNAME, GUEST_USER, GUEST_USER_FULLNAME, SUPERADMIN_USER, SUPERADMIN_USER_FULLNAME| Constructor and Description |
|---|
XWikiRightServiceImpl()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAccess(String action,
XWikiDocument doc,
XWikiContext context)
Deprecated.
Checks if the wiki current user has the right to execute (@code action} on the document
doc, along with
redirecting to the login if it's not the case and there is no logged in user (the user is the guest user). |
boolean |
checkRight(String userOrGroupName,
XWikiDocument doc,
String accessLevel,
boolean user,
boolean allow,
boolean global,
XWikiContext context)
Deprecated.
|
String |
getRight(String action)
Deprecated.
|
boolean |
hasAccessLevel(String accessLevel,
String userOrGroupName,
String entityReference,
boolean user,
XWikiContext context)
Deprecated.
|
boolean |
hasAccessLevel(String right,
String username,
String docname,
XWikiContext context)
Deprecated.
Verifies if the user identified by
username has the access level identified by right on the
document with the name docname. |
boolean |
hasAdminRights(XWikiContext context)
Deprecated.
Checks that the current user in the context (the currently authenticated user) has administration rights either
on the current wiki or on the current space.
|
boolean |
hasProgrammingRights(XWikiContext context)
Deprecated.
Checks if the author of the context document (last editor of the content of the document) has programming rights
(used to determine if the protected calls in the script contained in the document should be executed or not).
|
boolean |
hasProgrammingRights(XWikiDocument doc,
XWikiContext context)
Deprecated.
Checks if the author of the passed document (last editor of the content of the document) has programming rights
(used to determine if the protected calls in the script contained in the document should be executed or not).
|
boolean |
hasWikiAdminRights(XWikiContext context)
Deprecated.
Checks that the current user in the context (the currently authenticated user) has administration rights on the
current wiki, regardless of any space admin rights that might also be available.
|
List<String> |
listAllLevels(XWikiContext context)
Deprecated.
|
protected void |
logAllow(String username,
String page,
String action,
String info)
Deprecated.
|
protected void |
logDeny(String username,
String page,
String action,
String info)
Deprecated.
|
protected void |
logDeny(String name,
String resourceKey,
String accessLevel,
String info,
Exception e)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisGuest, isSuperAdminpublic static final EntityReference RIGHTCLASS_REFERENCE
public static final EntityReference GLOBALRIGHTCLASS_REFERENCE
protected void logAllow(String username, String page, String action, String info)
protected void logDeny(String username, String page, String action, String info)
protected void logDeny(String name, String resourceKey, String accessLevel, String info, Exception e)
public List<String> listAllLevels(XWikiContext context) throws XWikiException
listAllLevels in interface XWikiRightServicecontext - the xwiki context of this requestXWikiException - if something goes wrong during the rights checking processpublic boolean checkAccess(String action, XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiRightServicedoc, along with
redirecting to the login if it's not the case and there is no logged in user (the user is the guest user).checkAccess in interface XWikiRightServiceaction - the action to be executed on the documentdoc - the document to perform action oncontext - the xwiki context in which to perform the verification (from which to get the user, for example)true if the user has right to execute action on doc, false otherwise
and requests the login from the authentication service (redirecting to the login page in the
case of a form authenticator, for example) when no user is logged in. XWikiException - if something goes wrong during the rights checking processpublic boolean hasAccessLevel(String right, String username, String docname, XWikiContext context) throws XWikiException
XWikiRightServiceusername has the access level identified by right on the
document with the name docname.hasAccessLevel in interface XWikiRightServiceright - the access level to check (for example, 'view' or 'edit' or 'comment').username - the name of the user to check the right fordocname - the document on which to check the rightcontext - the xwiki context in which to perform the verificationtrue if the user has the specified right on the document, false otherwiseXWikiException - if something goes wrong during the rights checking processpublic boolean checkRight(String userOrGroupName, XWikiDocument doc, String accessLevel, boolean user, boolean allow, boolean global, XWikiContext context) throws XWikiRightNotFoundException, XWikiException
public boolean hasAccessLevel(String accessLevel, String userOrGroupName, String entityReference, boolean user, XWikiContext context) throws XWikiException
XWikiExceptionpublic boolean hasProgrammingRights(XWikiContext context)
XWikiRightServicehasProgrammingRights in interface XWikiRightServicecontext - the xwiki context of this requesttrue if the author of the context document has programming rights, false otherwise.public boolean hasProgrammingRights(XWikiDocument doc, XWikiContext context)
XWikiRightServicehasProgrammingRights in interface XWikiRightServicedoc - the document to check programming rights forcontext - the xwiki context of this requesttrue if the author of doc has programming rights, false otherwise.public boolean hasAdminRights(XWikiContext context)
XWikiRightServicehasAdminRights in interface XWikiRightServicecontext - the xwiki context of this requesttrue if the current user in the context has the admin right, false otherwisepublic boolean hasWikiAdminRights(XWikiContext context)
XWikiRightServicehasWikiAdminRights in interface XWikiRightServicecontext - the xwiki context of this requesttrue if the current user in the context has the admin right, false otherwiseCopyright © 2004–2021 XWiki. All rights reserved.