Project

General

Profile

« Previous | Next » 

Revision 45716169

Added by Andreas Kohlbecker over 9 years ago

RolesSourceProvider to enable activities by cdm roles and protecting bulkeditors and term editors - #4055 (action enablement adapts to the users granted authorities)

View differences:

eu.etaxonomy.taxeditor.store/plugin.xml
963 963
      </definition>
964 964
      <definition
965 965
            id="hasROLE_USER_MANAGER">
966
            <test
967
                  args="ROLE_USER_MANAGER"
968
                  property="eu.etaxonomy.taxeditor.security.permissionTester.hasRole">
969
            </test>
966
            <with
967
               variable="eu.etaxonomy.taxeditor.security.userRoles">
968
            <iterate
969
                  ifEmpty="false"
970
                  operator="or">
971
               <or>
972
                  <equals
973
                        value="ROLE_ADMIN">
974
                  </equals>
975
                  <equals
976
                        value="ROLE_USER_MANAGER">
977
                  </equals>
978
               </or>
979
            </iterate>
980
         </with>
981
      </definition>
982
      <definition
983
            id="hasROLE_PROJECT_MANAGER">
984
         <with
985
               variable="eu.etaxonomy.taxeditor.security.userRoles">
986
            <iterate
987
                  ifEmpty="false"
988
                  operator="or">
989
               <or>
990
                  <equals
991
                        value="ROLE_ADMIN">
992
                  </equals>
993
                  <equals
994
                        value="ROLE_PROJECT_MANAGER">
995
                  </equals>
996
               </or>
997
            </iterate>
998
         </with>
970 999
      </definition>
971 1000
</extension>
972 1001
<extension
......
1027 1056
         activityId="eu.etaxonomy.taxeditor.store.activityUserManagement"
1028 1057
         pattern="eu\.etaxonomy\.taxeditor\..*/.*.UserManagement">
1029 1058
   </activityPatternBinding>
1059
   <activityPatternBinding
1060
         activityId="eu.etaxonomy.taxeditor.store.activityUserManagement"
1061
         pattern="eu\.etaxonomy\.taxeditor\..*/bulkeditor\.input\.group">
1062
   </activityPatternBinding>
1063
   <activity
1064
         description="ROLE_PROJECT_MANAGER dependent ui contributions"
1065
         id="eu.etaxonomy.taxeditor.store.activityProjectManagement"
1066
         name="ProjectManagement">
1067
      <enabledWhen>
1068
         <reference
1069
               definitionId="hasROLE_PROJECT_MANAGER">
1070
         </reference>
1071
      </enabledWhen>
1072
   </activity>
1073
   <activityPatternBinding
1074
         activityId="eu.etaxonomy.taxeditor.store.activityProjectManagement"
1075
         pattern="eu\.etaxonomy\.taxeditor\..*/eu\.etaxonomy\.taxeditor\..*\.definedTerm.*">
1076
   </activityPatternBinding>
1077
   <activityPatternBinding
1078
         activityId="eu.etaxonomy.taxeditor.store.activityProjectManagement"
1079
         pattern="eu.etaxonomy.taxeditor.bulkeditor/bulkeditor.menus.openmenu"
1080
         isEqualityPattern="true">
1081
   </activityPatternBinding>
1082
</extension>
1083
<extension
1084
      point="org.eclipse.ui.services">
1085
   <sourceProvider
1086
         provider="eu.etaxonomy.taxeditor.security.RolesSourceProvider">
1087
      <variable
1088
            name="eu.etaxonomy.taxeditor.security.userRoles"
1089
            priorityLevel="workbench">
1090
      </variable>
1091
   </sourceProvider>
1030 1092
</extension>
1031 1093
	
1032 1094
</plugin>

Also available in: Unified diff