[Registry-dev] svn commit r9390 -
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure
svn at wso2.org
svn at wso2.org
Thu Nov 1 17:23:08 PDT 2007
Author: chathura
Date: Thu Nov 1 17:20:57 2007
New Revision: 9390
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/RegistryUserManager.java
Log:
Added permission checking method.
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/RegistryUserManager.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/RegistryUserManager.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/RegistryUserManager.java Thu Nov 1 17:20:57 2007
@@ -345,6 +345,19 @@
}
}
+ public boolean isUserAuthorized(String userName, String resourcePath, String action)
+ throws RegistryException {
+
+ try {
+ return realm.isUserAuthorized(userName, resourcePath, action);
+ } catch (UserManagerException e) {
+ String msg = "Could not get the permissions for the user " +
+ userName + " for the resource " + resourcePath;
+ log.error(msg, e);
+ throw new RegistryException(msg);
+ }
+ }
+
public void addUserToRole(String userName, String roleName) throws RegistryException {
try {
More information about the Registry-dev
mailing list