|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.realm.RegistryAuthorizationManager
public class RegistryAuthorizationManager
The Registry wrapper for the authorization manager.
Constructor Summary | |
---|---|
RegistryAuthorizationManager(org.wso2.carbon.user.core.UserRealm coreRealm)
Construct the registry authorization manager |
Method Summary | |
---|---|
void |
authorizeRole(String roleName,
org.wso2.carbon.user.core.Permission[] permissions)
Authorize role for an array of permission |
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. |
void |
resetPermissionOnUpdateRole(String roleName,
String newRoleName)
this will reset the permission of the renamed role |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegistryAuthorizationManager(org.wso2.carbon.user.core.UserRealm coreRealm)
coreRealm
- the realm to wrap.Method Detail |
---|
public String computePathOnMount(String path)
@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 authorizeRole(String roleName, org.wso2.carbon.user.core.Permission[] permissions) throws org.wso2.carbon.user.core.UserStoreException
roleName
- the role namepermissions
- array of permission
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 failed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |