dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43229
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21954: minor
------------------------------------------------------------
revno: 21954
committer: Abyot Asalefew Gizaw <abyot@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-02-12 11:43:51 +0100
message:
minor
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
--
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-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2016-02-11 13:25:22 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2016-02-12 10:43:51 +0000
@@ -483,7 +483,7 @@
})
/* Factory for fetching OrgUnit */
-.factory('OrgUnitFactory', function($http, SessionStorageService) {
+.factory('OrgUnitFactory', function($http) {
var orgUnit, orgUnitPromise, rootOrgUnitPromise,orgUnitTreePromise;
return {
get: function(uid){
@@ -496,19 +496,8 @@
return orgUnitPromise;
},
getSearchTreeRoot: function(){
- //var roles = SessionStorageService.get('USER_ROLES');
if(!rootOrgUnitPromise){
- var url = '../api/me.json?fields=organisationUnits[id,name,level,children[id,name,level,children[id,name,level]]]&paging=false';
- /*if( roles && roles.userCredentials && roles.userCredentials.userRoles){
- var userRoles = roles.userCredentials.userRoles;
- for(var i=0; i<userRoles.length; i++){
- if(userRoles[i].authorities.indexOf('ALL') !== -1 ||
- userRoles[i].authorities.indexOf('F_TRACKED_ENTITY_INSTANCE_SEARCH_IN_ALL_ORGUNITS') !== -1 ){
- url = '../api/organisationUnits.json?filter=level:eq:1&fields=id,name,children[id,name,children[id,name]]&paging=false';
- i=userRoles.length;
- }
- }
- }*/
+ var url = '../api/me.json?fields=organisationUnits[id,name,level,children[id,name,level,children[id,name,level]]]&paging=false';
rootOrgUnitPromise = $http.get( url ).then(function(response){
return response.data;
});