RolesSourceProvider to enable activities by cdm roles and protecting bulkeditors...
[taxeditor.git] / eu.etaxonomy.taxeditor.store / plugin.xml
index 03fd6d030704ae36747ee6e75745b112b6bad46d..3eeaba994bdfd8eec0d2d23cd438303f34010df5 100644 (file)
       </definition>
       <definition
             id="hasROLE_USER_MANAGER">
       </definition>
       <definition
             id="hasROLE_USER_MANAGER">
-            <test
-                  args="ROLE_USER_MANAGER"
-                  property="eu.etaxonomy.taxeditor.security.permissionTester.hasRole">
-            </test>
+            <with
+               variable="eu.etaxonomy.taxeditor.security.userRoles">
+            <iterate
+                  ifEmpty="false"
+                  operator="or">
+               <or>
+                  <equals
+                        value="ROLE_ADMIN">
+                  </equals>
+                  <equals
+                        value="ROLE_USER_MANAGER">
+                  </equals>
+               </or>
+            </iterate>
+         </with>
+      </definition>
+      <definition
+            id="hasROLE_PROJECT_MANAGER">
+         <with
+               variable="eu.etaxonomy.taxeditor.security.userRoles">
+            <iterate
+                  ifEmpty="false"
+                  operator="or">
+               <or>
+                  <equals
+                        value="ROLE_ADMIN">
+                  </equals>
+                  <equals
+                        value="ROLE_PROJECT_MANAGER">
+                  </equals>
+               </or>
+            </iterate>
+         </with>
       </definition>
 </extension>
 <extension
       </definition>
 </extension>
 <extension
          activityId="eu.etaxonomy.taxeditor.store.activityUserManagement"
          pattern="eu\.etaxonomy\.taxeditor\..*/.*.UserManagement">
    </activityPatternBinding>
          activityId="eu.etaxonomy.taxeditor.store.activityUserManagement"
          pattern="eu\.etaxonomy\.taxeditor\..*/.*.UserManagement">
    </activityPatternBinding>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityUserManagement"
+         pattern="eu\.etaxonomy\.taxeditor\..*/bulkeditor\.input\.group">
+   </activityPatternBinding>
+   <activity
+         description="ROLE_PROJECT_MANAGER dependent ui contributions"
+         id="eu.etaxonomy.taxeditor.store.activityProjectManagement"
+         name="ProjectManagement">
+      <enabledWhen>
+         <reference
+               definitionId="hasROLE_PROJECT_MANAGER">
+         </reference>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityProjectManagement"
+         pattern="eu\.etaxonomy\.taxeditor\..*/eu\.etaxonomy\.taxeditor\..*\.definedTerm.*">
+   </activityPatternBinding>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityProjectManagement"
+         pattern="eu.etaxonomy.taxeditor.bulkeditor/bulkeditor.menus.openmenu"
+         isEqualityPattern="true">
+   </activityPatternBinding>
+</extension>
+<extension
+      point="org.eclipse.ui.services">
+   <sourceProvider
+         provider="eu.etaxonomy.taxeditor.security.RolesSourceProvider">
+      <variable
+            name="eu.etaxonomy.taxeditor.security.userRoles"
+            priorityLevel="workbench">
+      </variable>
+   </sourceProvider>
 </extension>
        
 </plugin>
 </extension>
        
 </plugin>