|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XWikiRightService
| Field Summary | |
|---|---|
static java.lang.String |
ALLGROUP_GROUP
The AllGroup username. |
static java.lang.String |
ALLGROUP_GROUP_FULLNAME
The AllGroup full name. |
static java.lang.String |
GUEST_USER
The Guest username. |
static java.lang.String |
GUEST_USER_FULLNAME
The Guest full name. |
static java.lang.String |
SUPERADMIN_USER
The Superadmin username. |
static java.lang.String |
SUPERADMIN_USER_FULLNAME
The Superadmin full name. |
| Method Summary | |
|---|---|
boolean |
checkAccess(java.lang.String action,
XWikiDocument doc,
XWikiContext context)
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 |
hasAccessLevel(java.lang.String right,
java.lang.String username,
java.lang.String docname,
XWikiContext context)
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)
Checks that the current user in the context (the currently authenticated user) has administration rights on the current wiki. |
boolean |
hasProgrammingRights(XWikiContext context)
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)
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). |
java.util.List<java.lang.String> |
listAllLevels(XWikiContext context)
|
| Field Detail |
|---|
static final java.lang.String SUPERADMIN_USER
static final java.lang.String SUPERADMIN_USER_FULLNAME
static final java.lang.String GUEST_USER
static final java.lang.String GUEST_USER_FULLNAME
static final java.lang.String ALLGROUP_GROUP
static final java.lang.String ALLGROUP_GROUP_FULLNAME
| Method Detail |
|---|
boolean checkAccess(java.lang.String action,
XWikiDocument doc,
XWikiContext context)
throws XWikiException
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).
action - 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 process
boolean hasAccessLevel(java.lang.String right,
java.lang.String username,
java.lang.String docname,
XWikiContext context)
throws XWikiException
username has the access level identified by right on the
document with the name docname.
right - 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 verification
true if the user has the specified right on the document, false otherwise
XWikiException - if something goes wrong during the rights checking processboolean hasProgrammingRights(XWikiContext context)
context - the xwiki context of this request
true if the author of the context document has programming rights, false otherwise.
boolean hasProgrammingRights(XWikiDocument doc,
XWikiContext context)
doc - the document to check programming rights forcontext - the xwiki context of this request
true if the author of doc has programming rights, false otherwise.boolean hasAdminRights(XWikiContext context)
context - the xwiki context of this request
true if the current user in the context has the admin right, false otherwise
java.util.List<java.lang.String> listAllLevels(XWikiContext context)
throws XWikiException
context - the xwiki context of this request
XWikiException - if something goes wrong during the rights checking process
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||