roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r538654 - /roller/trunk/src/org/apache/roller/ui/core/util/struts2/UIAction.java
Date Wed, 16 May 2007 17:21:50 GMT
Author: agilliland
Date: Wed May 16 10:21:50 2007
New Revision: 538654

URL: http://svn.apache.org/viewvc?view=rev&rev=538654
Log:
add convenience method to check if the currently logged in user is an admin.


Modified:
    roller/trunk/src/org/apache/roller/ui/core/util/struts2/UIAction.java

Modified: roller/trunk/src/org/apache/roller/ui/core/util/struts2/UIAction.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/core/util/struts2/UIAction.java?view=diff&rev=538654&r1=538653&r2=538654
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/core/util/struts2/UIAction.java (original)
+++ roller/trunk/src/org/apache/roller/ui/core/util/struts2/UIAction.java Wed May 16 10:21:50
2007
@@ -94,6 +94,11 @@
         return -1;
     }
     
+    // convenient way to tell if user being dealt with is an admin
+    public boolean isUserIsAdmin() {
+        return getAuthenticatedUser().hasRole("admin");
+    }
+    
     
     public String getSiteURL() {
         return RollerRuntimeConfig.getRelativeContextURL();



Mime
View raw message