← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1557: Enabled system authroties provider for automatic access provider

 

------------------------------------------------------------
revno: 1557
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-03-04 23:55:47 +0100
message:
  Enabled system authroties provider for automatic access provider
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.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-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java	2010-03-04 20:36:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java	2010-03-04 22:55:47 +0000
@@ -88,11 +88,7 @@
 
     protected Collection<String> getAuthorities()
     {
-        //return systemAuthoritiesProvider.getSystemAuthorities();
-
-        HashSet<String> authorities = new HashSet<String>( 1 );
-        authorities.add( "ALL" );
-        return authorities;
+        return systemAuthoritiesProvider.getSystemAuthorities();
     }
 
     protected GrantedAuthority[] getGrantedAuthorities()

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2010-03-04 20:55:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2010-03-04 22:55:47 +0000
@@ -316,15 +316,13 @@
     
 	<bean id="databaseAutomaticAccessProvider" class="org.hisp.dhis.security.DatabaseAutomaticAccessProvider">
 		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
-		<property name="systemAuthoritiesProvider"
-			ref="org.hisp.dhis.security.authority.SystemAuthoritiesProvider" />
+		<property name="systemAuthoritiesProvider" ref="simpleSystemAuthoritiesProvider" />
 		<property name="passwordManager" ref="org.hisp.dhis.security.PasswordManager" />
 	</bean>
 
 	<bean id="ghostAutomaticAccessProvider" class="org.hisp.dhis.security.GhostAutomaticAccessProvider">
 		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
-		<property name="systemAuthoritiesProvider"
-			ref="org.hisp.dhis.security.authority.SystemAuthoritiesProvider" />
+		<property name="systemAuthoritiesProvider" ref="simpleSystemAuthoritiesProvider" />
 	</bean>
 
     <!-- Security : AccessDecion/Voter -->