public class AuthorizationUtils extends Object
| Constructor and Description |
|---|
AuthorizationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addAuthorizeRoleListener(int executionId,
String path,
String permission,
String executeAction)
Adds listener to intercept authorizeRole and clearRoleActionOnAllResources operations.
|
static void |
addAuthorizeRoleListener(int executionId,
String path,
String permission,
String executeAction,
String[] actions)
Adds listener to intercept authorizeRole and clearRoleActionOnAllResources operations.
|
static boolean |
authorize(String resourcePath,
String action)
Method to authorize a given resource path for a given action.
|
static void |
clearAuthorizations(String resourcePath)
Method to clear authorizations for a given resource path.
|
static void |
copyAuthorizations(String sourcePath,
String targetPath)
Method to copy authorizations from one path to another.
|
static void |
denyAnonAuthorization(String path,
org.wso2.carbon.user.core.UserRealm userRealm)
Deprecated.
|
static String |
getAuthorizationPath(String resourcePath)
Path of a resource given to the Registry interface may contain extensions to refer meta data
about resources.
|
static void |
populateUserStore(org.wso2.carbon.user.core.UserRealm realm)
Deprecated.
|
static void |
setAnonAuthorization(String path,
org.wso2.carbon.user.core.UserRealm userRealm)
Deprecated.
|
static void |
setRootAuthorizations(String rootPath,
org.wso2.carbon.user.core.UserRealm userRealm)
Method to set authorizations to the root path.
|
public static boolean authorize(String resourcePath, String action) throws RegistryException
resourcePath - the resource path.action - the action.RegistryException - if the operation failed.@Deprecated public static void setAnonAuthorization(String path, org.wso2.carbon.user.core.UserRealm userRealm) throws RegistryException
path - the resource path.userRealm - the user realmRegistryException - if the operation failed.public static void clearAuthorizations(String resourcePath) throws RegistryException
resourcePath - the resource path.RegistryException - if the operation failed.public static void copyAuthorizations(String sourcePath, String targetPath) throws RegistryException
sourcePath - the source path (where to copy from)targetPath - the target path (where to copy to)RegistryException - if the operation failed.@Deprecated public static void denyAnonAuthorization(String path, org.wso2.carbon.user.core.UserRealm userRealm) throws RegistryException
path - the path.userRealm - the user realm to use.RegistryException - if the operation failed.public static void setRootAuthorizations(String rootPath, org.wso2.carbon.user.core.UserRealm userRealm) throws RegistryException
rootPath - the root path.userRealm - the user realm to use.RegistryException - if the operation failed.@Deprecated public static void populateUserStore(org.wso2.carbon.user.core.UserRealm realm) throws org.wso2.carbon.user.core.UserStoreException
realm - Realm for which data has to be populatedorg.wso2.carbon.user.core.UserStoreException - if the operation failed.public static String getAuthorizationPath(String resourcePath)
resourcePath - A path string, which may contain extensionspublic static void addAuthorizeRoleListener(int executionId,
String path,
String permission,
String executeAction,
String[] actions)
executionId - an identifier which determines the order in which this listener is
called.path - the path to which authorizations should be granted on the repository.permission - the corresponding UI permissionexecuteAction - the execute action used by the User Management bundleactions - the actions which we authorize this role for the given pathAuthorizationManager.authorizeRole(String, String, String),
AuthorizationManager.clearRoleActionOnAllResources(String,
String)public static void addAuthorizeRoleListener(int executionId,
String path,
String permission,
String executeAction)
executionId - an identifier which determines the order in which this listener is
called.path - the path to which authorizations should be granted on the repository.permission - the corresponding UI permissionexecuteAction - the execute action used by the User Management bundleAuthorizationManager.authorizeRole(String, String, String),
AuthorizationManager.clearRoleActionOnAllResources(String,
String)Copyright © 2015 WSO2 Inc. All Rights Reserved.