public class AuthorizeRoleListener
extends org.wso2.carbon.user.core.common.AbstractAuthorizationManagerListener
implements org.wso2.carbon.user.core.listener.AuthorizationManagerListener
Constructor and Description |
---|
AuthorizeRoleListener(int executionId,
String path,
String permission,
String executeAction,
String[] actions)
Creates an instance of an authorize role listener.
|
Modifier and Type | Method and Description |
---|---|
boolean |
authorizeRole(String roleName,
String resourceId,
String action,
org.wso2.carbon.user.core.AuthorizationManager authorizationManager)
Grants authorization to a role to perform an action on a resource.
|
boolean |
clearRoleActionOnAllResources(String roleName,
String action,
org.wso2.carbon.user.core.AuthorizationManager authorizationManager)
Deletes the role's right to perform the action on all resources.
|
int |
getExecutionOrderId()
Method to get the execution order identifier.
|
authorizeUser, clearResourceAuthorizations, clearRoleAuthorization, clearRoleAuthorization, clearUserAuthorization, clearUserAuthorization, denyRole, denyUser, isRoleAuthorized, isUserAuthorized, resetPermissionOnUpdateRole
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authorizeUser, clearResourceAuthorizations, clearRoleAuthorization, clearRoleAuthorization, clearUserAuthorization, clearUserAuthorization, denyRole, denyUser, isRoleAuthorized, isUserAuthorized, resetPermissionOnUpdateRole
public AuthorizeRoleListener(int executionId, String path, String permission, String executeAction, String[] actions)
executionId
- the execution order identifierpath
- the resource (or collection) pathpermission
- the permission. This should not be prefixed with the registry root.executeAction
- the execute action required.actions
- the actions to which the role would be authorized.public int getExecutionOrderId()
getExecutionOrderId
in interface org.wso2.carbon.user.core.listener.AuthorizationManagerListener
public boolean clearRoleActionOnAllResources(String roleName, String action, org.wso2.carbon.user.core.AuthorizationManager authorizationManager) throws org.wso2.carbon.user.core.UserStoreException
clearRoleActionOnAllResources
in interface org.wso2.carbon.user.core.listener.AuthorizationManagerListener
clearRoleActionOnAllResources
in class org.wso2.carbon.user.core.common.AbstractAuthorizationManagerListener
roleName
- the name of the role.action
- the action of the granted permission.authorizationManager
- the authorization manager to use.org.wso2.carbon.user.core.UserStoreException
- if an error occurs.public boolean authorizeRole(String roleName, String resourceId, String action, org.wso2.carbon.user.core.AuthorizationManager authorizationManager) throws org.wso2.carbon.user.core.UserStoreException
authorizeRole
in interface org.wso2.carbon.user.core.listener.AuthorizationManagerListener
authorizeRole
in class org.wso2.carbon.user.core.common.AbstractAuthorizationManagerListener
roleName
- the name of the roleresourceId
- resource identification stringaction
- the action of the granted permission.authorizationManager
- the authorization manager to use.org.wso2.carbon.user.core.UserStoreException
- if an error occurs.Copyright © 2016 WSO2 Inc. All Rights Reserved.