dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40084
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20295: Authority, initialized authorities list to prevent nullpointers. FileResourceSchemaDescriptor, re...
------------------------------------------------------------
revno: 20295
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-09-22 16:06:43 +0200
message:
Authority, initialized authorities list to prevent nullpointers. FileResourceSchemaDescriptor, remvoed authorities for now.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/FileResourceSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/Authority.java
--
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/descriptors/FileResourceSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/FileResourceSchemaDescriptor.java 2015-09-22 13:29:05 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/FileResourceSchemaDescriptor.java 2015-09-22 14:06:43 +0000
@@ -31,8 +31,6 @@
import org.hisp.dhis.fileresource.FileResource;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
-import org.hisp.dhis.security.Authority;
-import org.hisp.dhis.security.AuthorityType;
import org.springframework.stereotype.Component;
/**
@@ -55,9 +53,6 @@
schema.setRelativeApiEndpoint( API_ENDPOINT );
schema.setShareable( false );
schema.setOrder( 1250 );
-
- schema.getAuthorities().add( new Authority( AuthorityType.READ ) );
-
return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/Authority.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/Authority.java 2015-07-14 07:21:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/Authority.java 2015-09-22 14:06:43 +0000
@@ -32,8 +32,10 @@
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+
import org.hisp.dhis.common.DxfNamespaces;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -44,7 +46,7 @@
{
private AuthorityType type;
- private List<String> authorities;
+ private List<String> authorities = new ArrayList<String>();
public Authority( AuthorityType type )
{
@@ -56,7 +58,7 @@
this( type );
this.authorities = authorities;
}
-
+
@JsonProperty
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public AuthorityType getType()