public class RegistryAuthorizationManager extends Object implements org.wso2.carbon.user.core.AuthorizationManager
Constructor and Description |
---|
RegistryAuthorizationManager(org.wso2.carbon.user.core.UserRealm coreRealm)
Construct the registry authorization manager
|
Modifier and Type | Method and Description |
---|---|
void |
authorizeRole(String roleName,
String resourceId,
String action)
Authorize role for an action on a resource.
|
void |
authorizeUser(String userName,
String resourceId,
String action)
Deprecated.
|
void |
clearResourceAuthorizations(String resourceId)
clear the resource authorizations.
|
void |
clearRoleActionOnAllResources(String roleName,
String action)
Get the explicitly denied users for a resource.
|
void |
clearRoleAuthorization(String roleName)
Clear the role authorization.
|
void |
clearRoleAuthorization(String roleName,
String resourceId,
String action)
Clear the role authorization for a given resource id and action.
|
void |
clearUserAuthorization(String userName)
Deprecated.
|
void |
clearUserAuthorization(String userName,
String resourceId,
String action)
Deprecated.
|
String |
computePathOnMount(String path) |
void |
denyRole(String roleName,
String resourceId,
String action)
Deny role to do an action on a resource.
|
void |
denyUser(String userName,
String resourceId,
String action)
Deprecated.
|
String[] |
getAllowedRolesForResource(String resourceId,
String action)
Get allowed roles for a resource to do an action.
|
String[] |
getAllowedUIResourcesForUser(String userName,
String permissionRootPath)
Get the allowed UI resources for a user.
|
String[] |
getDeniedRolesForResource(String resourceId,
String action)
Get denied roles for a resource to do an action.
|
String[] |
getExplicitlyAllowedUsersForResource(String resourceId,
String action)
Deprecated.
|
String[] |
getExplicitlyDeniedUsersForResource(String resourceId,
String action)
Deprecated.
|
int |
getTenantId()
this will get the tenant id associated with the user authorization manager
|
boolean |
isRoleAuthorized(String roleName,
String resourceId,
String action)
Check whether the role is authorized do an action on a resource.
|
boolean |
isUserAuthorized(String userName,
String resourceId,
String action)
Check whether the user is authorized to do an action on a resource.
|
String[] |
normalizeRoles(String[] roles) |
void |
resetPermissionOnUpdateRole(String roleName,
String newRoleName)
this will reset the permission of the renamed role
|
public RegistryAuthorizationManager(org.wso2.carbon.user.core.UserRealm coreRealm)
coreRealm
- the realm to wrap.@Deprecated public void clearUserAuthorization(String userName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
clearUserAuthorization
in interface org.wso2.carbon.user.api.AuthorizationManager
userName
- the user name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public void clearRoleAuthorization(String roleName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
clearRoleAuthorization
in interface org.wso2.carbon.user.api.AuthorizationManager
roleName
- the role name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.@Deprecated public void authorizeUser(String userName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
authorizeUser
in interface org.wso2.carbon.user.api.AuthorizationManager
userName
- the user name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public void authorizeRole(String roleName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
authorizeRole
in interface org.wso2.carbon.user.api.AuthorizationManager
roleName
- the role name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public void clearResourceAuthorizations(String resourceId) throws org.wso2.carbon.user.core.UserStoreException
clearResourceAuthorizations
in interface org.wso2.carbon.user.api.AuthorizationManager
resourceId
- the resource id.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public boolean isUserAuthorized(String userName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
isUserAuthorized
in interface org.wso2.carbon.user.api.AuthorizationManager
userName
- the user name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public boolean isRoleAuthorized(String roleName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
isRoleAuthorized
in interface org.wso2.carbon.user.api.AuthorizationManager
roleName
- the role name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public String[] getAllowedRolesForResource(String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
getAllowedRolesForResource
in interface org.wso2.carbon.user.api.AuthorizationManager
resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public void denyRole(String roleName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
denyRole
in interface org.wso2.carbon.user.api.AuthorizationManager
roleName
- the role name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.@Deprecated public void denyUser(String userName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
denyUser
in interface org.wso2.carbon.user.api.AuthorizationManager
userName
- the user name.resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public String[] getDeniedRolesForResource(String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
getDeniedRolesForResource
in interface org.wso2.carbon.user.api.AuthorizationManager
resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.@Deprecated public String[] getExplicitlyAllowedUsersForResource(String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
getExplicitlyAllowedUsersForResource
in interface org.wso2.carbon.user.api.AuthorizationManager
resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.@Deprecated public String[] getExplicitlyDeniedUsersForResource(String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
getExplicitlyDeniedUsersForResource
in interface org.wso2.carbon.user.api.AuthorizationManager
resourceId
- the resource id.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public void clearRoleActionOnAllResources(String roleName, String action) throws org.wso2.carbon.user.core.UserStoreException
clearRoleActionOnAllResources
in interface org.wso2.carbon.user.api.AuthorizationManager
roleName
- the role name.action
- the action.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public String[] getAllowedUIResourcesForUser(String userName, String permissionRootPath) throws org.wso2.carbon.user.core.UserStoreException
getAllowedUIResourcesForUser
in interface org.wso2.carbon.user.api.AuthorizationManager
userName
- the user name.org.wso2.carbon.user.core.UserStoreException
- if the operation failed.public void clearRoleAuthorization(String roleName) throws org.wso2.carbon.user.core.UserStoreException
clearRoleAuthorization
in interface org.wso2.carbon.user.api.AuthorizationManager
roleName
- the role name.org.wso2.carbon.user.core.UserStoreException
- if the operation failed.@Deprecated public void clearUserAuthorization(String userName) throws org.wso2.carbon.user.core.UserStoreException
clearUserAuthorization
in interface org.wso2.carbon.user.api.AuthorizationManager
userName
- the user name.org.wso2.carbon.user.core.UserStoreException
- throws if the operation failed.public int getTenantId() throws org.wso2.carbon.user.core.UserStoreException
getTenantId
in interface org.wso2.carbon.user.api.AuthorizationManager
org.wso2.carbon.user.core.UserStoreException
- if the operation failedpublic void resetPermissionOnUpdateRole(String roleName, String newRoleName) throws org.wso2.carbon.user.core.UserStoreException
resetPermissionOnUpdateRole
in interface org.wso2.carbon.user.api.AuthorizationManager
roleName
- existing role name.newRoleName
- new role name.org.wso2.carbon.user.core.UserStoreException
- if the operation failedCopyright © 2015 WSO2 Inc. All Rights Reserved.