maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r447274 - /maven/shared/trunk/maven-user/maven-user-acegi/src/main/java/org/apache/maven/user/acegi/AclManager.java
Date Mon, 18 Sep 2006 06:16:24 GMT
Author: carlos
Date: Sun Sep 17 23:16:23 2006
New Revision: 447274

URL: http://svn.apache.org/viewvc?view=rev&rev=447274
Log:
Add getUserInstancePermissions method

Modified:
    maven/shared/trunk/maven-user/maven-user-acegi/src/main/java/org/apache/maven/user/acegi/AclManager.java

Modified: maven/shared/trunk/maven-user/maven-user-acegi/src/main/java/org/apache/maven/user/acegi/AclManager.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/maven-user-acegi/src/main/java/org/apache/maven/user/acegi/AclManager.java?view=diff&rev=447274&r1=447273&r2=447274
==============================================================================
--- maven/shared/trunk/maven-user/maven-user-acegi/src/main/java/org/apache/maven/user/acegi/AclManager.java
(original)
+++ maven/shared/trunk/maven-user/maven-user-acegi/src/main/java/org/apache/maven/user/acegi/AclManager.java
Sun Sep 17 23:16:23 2006
@@ -148,6 +148,21 @@
     }
 
     /**
+     * Get the instance permissions for a user and object ( identified by its class and id
)
+     * 
+     * @param clazz {@link Class} of the object
+     * @param id identifier of the object
+     * @param userName name of the user
+     * @return the permissions for that user and object
+     */
+    public InstancePermissions getUserInstancePermissions( Class clazz, Object id, String
userName )
+    {
+        InstancePermissions permission = new InstancePermissions();
+        aclToPermission( getAcl( clazz, id, userName ), permission );
+        return permission;
+    }
+
+    /**
      * Updates a list of permissions at the same time. If the permission didn't exist it's
created.
      * 
      * @param permissions {@link Collection} <{@link InstancePermissions}> .



Mime
View raw message