solving #4011 (disallow changing publish flag for users with insuffcient rights)...
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Mon, 3 Feb 2014 17:07:57 +0000 (17:07 +0000)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Mon, 3 Feb 2014 17:07:57 +0000 (17:07 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java

index 4730a4fc440a27a950c73ef2c9e7589244eb98a0..97919a11238cea547e679addb9c63011280adaf2 100644 (file)
@@ -352,7 +352,10 @@ public class CdmStore {
                return getPermissionEvaluator().hasPermission(context.getAuthentication(), null, targetType.getName(), permission);
        }
        
-
+       public static boolean currentAuthentiationHasOneOfRoles(Role ... roles){
+               SecurityContext context = SecurityContextHolder.getContext();
+               return getPermissionEvaluator().hasOneOfRoles(context.getAuthentication(), roles);
+       }
        
        /*
         * LANGUAGE