Package com.xpn.xwiki.user.impl.xwiki
Class XWikiRightServiceImpl
- java.lang.Object
-
- com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl
-
- All Implemented Interfaces:
XWikiRightService
@Deprecated public class XWikiRightServiceImpl extends Object implements XWikiRightService
Deprecated.since 4.0, use XWikiCachingRightService insteadDefault implementation ofXWikiRightService.- Version:
- $Id: 0e38d609e13bbcb67c66ec2e9203955fc58de24a $
-
-
Field Summary
Fields Modifier and Type Field Description static EntityReferenceGLOBALRIGHTCLASS_REFERENCEDeprecated.static EntityReferenceRIGHTCLASS_REFERENCEDeprecated.-
Fields inherited from interface com.xpn.xwiki.user.api.XWikiRightService
ALLGROUP_GROUP, ALLGROUP_GROUP_FULLNAME, GUEST_USER, GUEST_USER_FULLNAME, SUPERADMIN_USER, SUPERADMIN_USER_FULLNAME
-
-
Constructor Summary
Constructors Constructor Description XWikiRightServiceImpl()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancheckAccess(String action, XWikiDocument doc, XWikiContext context)Deprecated.Checks if the wiki current user has the right to execute (@code action} on the documentdoc, 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).booleancheckRight(String userOrGroupName, XWikiDocument doc, String accessLevel, boolean user, boolean allow, boolean global, XWikiContext context)Deprecated.StringgetRight(String action)Deprecated.booleanhasAccessLevel(String accessLevel, String userOrGroupName, String entityReference, boolean user, XWikiContext context)Deprecated.booleanhasAccessLevel(String right, String username, String docname, XWikiContext context)Deprecated.Verifies if the user identified byusernamehas the access level identified byrighton the document with the namedocname.booleanhasAdminRights(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.booleanhasProgrammingRights(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).booleanhasProgrammingRights(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).booleanhasWikiAdminRights(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 voidlogAllow(String username, String page, String action, String info)Deprecated.protected voidlogDeny(String username, String page, String action, String info)Deprecated.protected voidlogDeny(String name, String resourceKey, String accessLevel, String info, Exception e)Deprecated.
-
-
-
Field Detail
-
RIGHTCLASS_REFERENCE
public static final EntityReference RIGHTCLASS_REFERENCE
Deprecated.
-
GLOBALRIGHTCLASS_REFERENCE
public static final EntityReference GLOBALRIGHTCLASS_REFERENCE
Deprecated.
-
-
Method Detail
-
logAllow
protected void logAllow(String username, String page, String action, String info)
Deprecated.
-
logDeny
protected void logDeny(String username, String page, String action, String info)
Deprecated.
-
logDeny
protected void logDeny(String name, String resourceKey, String accessLevel, String info, Exception e)
Deprecated.
-
listAllLevels
public List<String> listAllLevels(XWikiContext context) throws XWikiException
Deprecated.- Specified by:
listAllLevelsin interfaceXWikiRightService- Parameters:
context- the xwiki context of this request- Returns:
- the list of all the known access levels
- Throws:
XWikiException- if something goes wrong during the rights checking process
-
checkAccess
public boolean checkAccess(String action, XWikiDocument doc, XWikiContext context) throws XWikiException
Deprecated.Description copied from interface:XWikiRightServiceChecks if the wiki current user has the right to execute (@code action} on the documentdoc, 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).- Specified by:
checkAccessin interfaceXWikiRightService- Parameters:
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)- Returns:
trueif the user has right to executeactionondoc,falseotherwise 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.- Throws:
XWikiException- if something goes wrong during the rights checking process
-
hasAccessLevel
public boolean hasAccessLevel(String right, String username, String docname, XWikiContext context) throws XWikiException
Deprecated.Description copied from interface:XWikiRightServiceVerifies if the user identified byusernamehas the access level identified byrighton the document with the namedocname.- Specified by:
hasAccessLevelin interfaceXWikiRightService- Parameters:
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- Returns:
trueif the user has the specified right on the document,falseotherwise- Throws:
XWikiException- if something goes wrong during the rights checking process
-
checkRight
public boolean checkRight(String userOrGroupName, XWikiDocument doc, String accessLevel, boolean user, boolean allow, boolean global, XWikiContext context) throws XWikiRightNotFoundException, XWikiException
Deprecated.
-
hasAccessLevel
public boolean hasAccessLevel(String accessLevel, String userOrGroupName, String entityReference, boolean user, XWikiContext context) throws XWikiException
Deprecated.- Throws:
XWikiException
-
hasProgrammingRights
public boolean hasProgrammingRights(XWikiContext context)
Deprecated.Description copied from interface:XWikiRightServiceChecks 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).- Specified by:
hasProgrammingRightsin interfaceXWikiRightService- Parameters:
context- the xwiki context of this request- Returns:
trueif the author of the context document has programming rights,falseotherwise.
-
hasProgrammingRights
public boolean hasProgrammingRights(XWikiDocument doc, XWikiContext context)
Deprecated.Description copied from interface:XWikiRightServiceChecks 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).- Specified by:
hasProgrammingRightsin interfaceXWikiRightService- Parameters:
doc- the document to check programming rights forcontext- the xwiki context of this request- Returns:
trueif the author ofdochas programming rights,falseotherwise.
-
hasAdminRights
public boolean hasAdminRights(XWikiContext context)
Deprecated.Description copied from interface:XWikiRightServiceChecks that the current user in the context (the currently authenticated user) has administration rights either on the current wiki or on the current space.- Specified by:
hasAdminRightsin interfaceXWikiRightService- Parameters:
context- the xwiki context of this request- Returns:
trueif the current user in the context has theadminright,falseotherwise
-
hasWikiAdminRights
public boolean hasWikiAdminRights(XWikiContext context)
Deprecated.Description copied from interface:XWikiRightServiceChecks 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.- Specified by:
hasWikiAdminRightsin interfaceXWikiRightService- Parameters:
context- the xwiki context of this request- Returns:
trueif the current user in the context has theadminright,falseotherwise
-
-