← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14436: update descriptors with authority information

 

------------------------------------------------------------
revno: 14436
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-03-26 15:28:00 +0100
message:
  update descriptors with authority information
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/AuthorityType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/AttributeSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionComboSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategorySchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ChartSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ConstantSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DashboardSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataDictionarySchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DocumentSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/AuthorityType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/AuthorityType.java	2014-03-26 13:27:43 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/AuthorityType.java	2014-03-26 14:28:00 +0000
@@ -33,6 +33,7 @@
  */
 public enum AuthorityType
 {
+    CREATE,
     CREATE_PUBLIC,
     CREATE_PRIVATE,
     EXTERNALIZE,

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/AttributeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/AttributeSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/AttributeSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( Attribute.class, "attribute", "attributes" );
+        Schema schema = new Schema( Attribute.class, "attribute", "attributes" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_ATTRIBUTE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_ATTRIBUTE_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataElementCategoryCombo.class, "categoryCombo", "categoryCombos" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_CATEGORY_COMBO_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_CATEGORY_COMBO_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_CATEGORY_COMBO_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_CATEGORY_COMBO_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_CATEGORY_COMBO_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionComboSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionComboSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionComboSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataElementCategoryOptionCombo.class, "categoryOptionCombo", "categoryOptionCombos" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_CATEGORY_COMBO_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_CATEGORY_COMBO_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_CATEGORY_COMBO_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_CATEGORY_COMBO_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_CATEGORY_COMBO_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.CategoryOptionGroup;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( CategoryOptionGroup.class, "categoryOptionGroup", "categoryOptionGroups" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSetSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionGroupSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.CategoryOptionGroupSet;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( CategoryOptionGroupSet.class, "categoryOptionGroupSet", "categoryOptionGroupSets" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_SET_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_SET_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_SET_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_SET_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_CATEGORY_OPTION_GROUP_SET_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryOptionSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.DataElementCategoryOption;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataElementCategoryOption.class, "categoryOption", "categoryOptions" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_CATEGORY_OPTION_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_CATEGORY_OPTION_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_CATEGORY_OPTION_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_CATEGORY_OPTION_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_CATEGORY_OPTION_PRIVATE_ADD" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategorySchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategorySchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategorySchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.DataElementCategory;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataElementCategory.class, "category", "categories" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_CATEGORY_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_CATEGORY_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_CATEGORY_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_CATEGORY_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_CATEGORY_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ChartSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ChartSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ChartSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,9 @@
         Schema schema = new Schema( Chart.class, "chart", "charts" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_CHART_PUBLIC_ADD" ) );
-        schema.setExternalAuthorities( Lists.newArrayList( "F_CHART_EXTERNAL" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_CHART_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.EXTERNALIZE, Lists.newArrayList( "F_CHART_EXTERNAL" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ConstantSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ConstantSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ConstantSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.constant.Constant;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( Constant.class, "constant", "constants" );
+        Schema schema = new Schema( Constant.class, "constant", "constants" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_CONSTANT_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_CONSTANT_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DashboardSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DashboardSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DashboardSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dashboard.Dashboard;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,7 +48,7 @@
         Schema schema = new Schema( Dashboard.class, "dashboard", "dashboards" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_DASHBOARD_PUBLIC_ADD" ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_DASHBOARD_PUBLIC_ADD" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataDictionarySchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataDictionarySchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataDictionarySchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.datadictionary.DataDictionary;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataDictionary.class, "dataDictionary", "dataDictionaries" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_DATADICTIONARY_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_DATADICTIONARY_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_DATADICTIONARY_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_DATADICTIONARY_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_DATADICTIONARY_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.DataElementGroup;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataElementGroup.class, "dataElementGroup", "dataElementGroups" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUP_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUP_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_DATAELEMENTGROUP_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_DATAELEMENTGROUP_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_DATAELEMENTGROUP_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataelement.DataElementGroupSet;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataElementGroupSet.class, "dataElementGroupSet", "dataElementGroupSets" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUPSET_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUPSET_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_DATAELEMENTGROUPSET_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_DATAELEMENTGROUPSET_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_DATAELEMENTGROUPSET_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataSetSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( DataSet.class, "dataSet", "dataSets" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_DATASET_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_DATASET_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_DATASET_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_DATASET_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_DATASET_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DocumentSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DocumentSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DocumentSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.document.Document;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,9 +48,11 @@
         Schema schema = new Schema( Document.class, "document", "documents" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_DOCUMENT_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_DOCUMENT_PRIVATE_ADD" ) );
-        schema.setExternalAuthorities( Lists.newArrayList( "F_DOCUMENT_EXTERNAL" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_DOCUMENT_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_DOCUMENT_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.EXTERNALIZE, Lists.newArrayList( "F_DOCUMENT_EXTERNAL" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_DOCUMENT_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.indicator.IndicatorGroup;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( IndicatorGroup.class, "indicatorGroup", "indicatorGroups" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_INDICATORGROUP_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_INDICATORGROUP_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_INDICATORGROUP_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_INDICATORGROUP_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_INDICATORGROUP_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSetSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorGroupSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.indicator.IndicatorGroupSet;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( IndicatorGroupSet.class, "indicatorGroupSet", "indicatorGroupSets" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_INDICATORGROUPSET_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_INDICATORGROUPSET_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_INDICATORGROUPSET_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_INDICATORGROUPSET_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_INDICATORGROUPSET_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.indicator.Indicator;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( Indicator.class, "indicator", "indicators" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_INDICATOR_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_INDICATOR_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_INDICATOR_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_INDICATOR_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_INDICATOR_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.indicator.IndicatorType;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( IndicatorType.class, "indicatorType", "indicatorTypes" );
+        Schema schema = new Schema( IndicatorType.class, "indicatorType", "indicatorTypes" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_INDICATORTYPE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_INDICATORTYPE_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.mapping.Map;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,9 @@
         Schema schema = new Schema( Map.class, "map", "maps" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_MAP_PUBLIC_ADD" ) );
-        schema.setExternalAuthorities( Lists.newArrayList( "F_MAP_EXTERNAL" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_MAP_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.EXTERNALIZE, Lists.newArrayList( "F_MAP_EXTERNAL" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.option.OptionSet;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( OptionSet.class, "optionSet", "optionSets" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_OPTIONSET_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_OPTIONSET_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_OPTIONSET_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_OPTIONSET_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_OPTIONSET_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( OrganisationUnitGroup.class, "organisationUnitGroup", "organisationUnitGroups" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_ORGUNITGROUP_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_ORGUNITGROUP_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_ORGUNITGROUP_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_ORGUNITGROUP_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_ORGUNITGROUP_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( OrganisationUnitGroupSet.class, "organisationUnitGroupSet", "organisationUnitGroupSets" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_ORGUNITGROUPSET_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_ORGUNITGROUPSET_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_ORGUNITGROUPSET_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_ORGUNITGROUPSET_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_ORGUNITGROUPSET_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,10 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( OrganisationUnitLevel.class, "organisationUnitLevel", "organisationUnitLevels" );
+        Schema schema = new Schema( OrganisationUnitLevel.class, "organisationUnitLevel", "organisationUnitLevels" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.UPDATE, Lists.newArrayList( "F_ORGANISATIONUNITLEVEL_UPDATE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( OrganisationUnit.class, "organisationUnit", "organisationUnits" );
+        Schema schema = new Schema( OrganisationUnit.class, "organisationUnit", "organisationUnits" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_ORGANISATIONUNIT_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_ORGANISATIONUNIT_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.program.Program;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( Program.class, "program", "programs" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_PROGRAM_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_PROGRAM_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_PROGRAM_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_PROGRAM_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_PROGRAM_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.program.ProgramStage;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( ProgramStage.class, "programStage", "programStages" );
+        Schema schema = new Schema( ProgramStage.class, "programStage", "programStages" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_PROGRAMSTAGE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_PROGRAMSTAGE_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.relationship.RelationshipType;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( RelationshipType.class, "relationshipType", "relationshipTypes" );
+        Schema schema = new Schema( RelationshipType.class, "relationshipType", "relationshipTypes" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_RELATIONSHIPTYPE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_RELATIONSHIPTYPE_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -30,6 +30,8 @@
 
 import com.google.common.collect.Lists;
 import org.hisp.dhis.report.Report;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -46,10 +48,12 @@
         Schema schema = new Schema( Report.class, "report", "reports" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_REPORT_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_REPORT_PRIVATE_ADD" ) );
-        schema.setExternalAuthorities( Lists.newArrayList( "F_REPORT_EXTERNAL" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_REPORT_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_REPORT_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.EXTERNALIZE, Lists.newArrayList( "F_REPORT_EXTERNAL" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_REPORT_DELETE" ) ) );
 
         return schema;
     }
-}
\ No newline at end of file
+}

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,7 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
 import org.hisp.dhis.dataset.Section;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.springframework.stereotype.Component;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( Section.class, "section", "sections" );
+        Schema schema = new Schema( Section.class, "section", "sections" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_SECTION_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_SECTION_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -29,6 +29,8 @@
  */
 
 import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.sqlview.SqlView;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( SqlView.class, "sqlView", "sqlViews" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_SQLVIEW_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_SQLVIEW_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_SQLVIEW_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_SQLVIEW_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_SQLVIEW_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,6 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeGroup;
@@ -42,6 +45,12 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( TrackedEntityAttributeGroup.class, "trackedEntityAttributeGroup", "trackedEntityAttributeGroups" );
+        Schema schema = new Schema( TrackedEntityAttributeGroup.class, "trackedEntityAttributeGroup", "trackedEntityAttributeGroups" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE,
+            Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD", "F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -29,6 +29,8 @@
  */
 
 import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( TrackedEntityAttribute.class, "trackedEntityAttribute", "trackedEntityAttributes" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,6 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.trackedentity.TrackedEntity;
@@ -42,6 +45,12 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( TrackedEntity.class, "trackedEntity", "trackedEntities" );
+        Schema schema = new Schema( TrackedEntity.class, "trackedEntity", "trackedEntities" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_TRACKED_ENTITY_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.UPDATE, Lists.newArrayList( "F_TRACKED_ENTITY_UPDATE" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_TRACKED_ENTITY_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -29,6 +29,8 @@
  */
 
 import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.user.UserGroup;
@@ -46,7 +48,7 @@
         Schema schema = new Schema( UserGroup.class, "userGroup", "userGroups" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_USERGROUP_PUBLIC_ADD" ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_USERGROUP_PUBLIC_ADD" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -29,6 +29,8 @@
  */
 
 import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.user.UserAuthorityGroup;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( UserAuthorityGroup.class, "userRole", "userRoles" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_USERROLE_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_USERROLE_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_USERROLE_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.UPDATE, Lists.newArrayList( "F_USERROLE_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_USERROLE_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,6 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.user.User;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( User.class, "user", "users" );
+        Schema schema = new Schema( User.class, "user", "users" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_USER_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_USER_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -29,6 +29,8 @@
  */
 
 import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.validation.ValidationRuleGroup;
@@ -46,8 +48,10 @@
         Schema schema = new Schema( ValidationRuleGroup.class, "validationRuleGroup", "validationRuleGroups" );
 
         schema.setShareable( true );
-        schema.setPublicAuthorities( Lists.newArrayList( "F_VALIDATIONRULEGROUP_PUBLIC_ADD" ) );
-        schema.setPrivateAuthorities( Lists.newArrayList( "F_VALIDATIONRULEGROUP_PRIVATE_ADD" ) );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_VALIDATIONRULEGROUP_PUBLIC_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.UPDATE, Lists.newArrayList( "F_VALIDATIONRULEGROUP_PRIVATE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_VALIDATIONRULEGROUP_DELETE" ) ) );
 
         return schema;
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java	2014-03-26 14:28:00 +0000
@@ -28,6 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.google.common.collect.Lists;
+import org.hisp.dhis.schema.Authority;
+import org.hisp.dhis.schema.AuthorityType;
 import org.hisp.dhis.schema.Schema;
 import org.hisp.dhis.schema.SchemaDescriptor;
 import org.hisp.dhis.validation.ValidationRule;
@@ -42,6 +45,11 @@
     @Override
     public Schema getSchema()
     {
-        return new Schema( ValidationRule.class, "validationRule", "validationRules" );
+        Schema schema = new Schema( ValidationRule.class, "validationRule", "validationRules" );
+
+        schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_VALIDATIONRULE_ADD" ) ) );
+        schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_VALIDATIONRULE_DELETE" ) ) );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml	2014-03-24 19:28:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml	2014-03-26 14:28:00 +0000
@@ -566,7 +566,7 @@
 
     <action name="removeDataElementCategoryOption" class="org.hisp.dhis.dd.action.category.RemoveDataElementCategoryOptionAction">
       <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
-      <param name="requiredAuthorities">F_CATEGORY_OPTION_DELETE</param>
+      <!--<param name="requiredAuthorities">F_CATEGORY_OPTION_DELETE</param>-->
     </action>
 
     <action name="getDataElementCategoryOption" class="org.hisp.dhis.dd.action.category.GetDataElementCategoryOptionAction">