roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r744271 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/GlobalPermission.java
Date Fri, 13 Feb 2009 22:44:01 GMT
Author: snoopdave
Date: Fri Feb 13 22:43:59 2009
New Revision: 744271

URL: http://svn.apache.org/viewvc?rev=744271&view=rev
Log:
Fix for https://issues.apache.org/roller/browse/ROL-1717

The only GlobalPermission action that implies a WeblogPermission is ADMIN.

Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/GlobalPermission.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/GlobalPermission.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/GlobalPermission.java?rev=744271&r1=744270&r2=744271&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/GlobalPermission.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/GlobalPermission.java
Fri Feb 13 22:43:59 2009
@@ -89,9 +89,13 @@
     }
         
     public boolean implies(Permission perm) {
-        if (perm instanceof RollerPermission) {
-            RollerPermission rperm = (RollerPermission)perm;
-            
+        if (perm instanceof WeblogPermission) {
+            if (hasAction(ADMIN)) {
+                // admin implies all other permissions
+                return true;                
+            } 
+        } else if (perm instanceof RollerPermission) {
+            RollerPermission rperm = (RollerPermission)perm;            
             if (hasAction(ADMIN)) {
                 // admin implies all other permissions
                 return true;



Mime
View raw message