Ok...and you cannot just revert to the dump? Or the dump has the same problem?
In any case, since you have a dump which you can experiment with (pls note that I have not tested this procedure thoroughly, and you might get more than one answer if you have more than one root or more than one superuser): In any case, you should be able to do this in three steps - first finding the root OU and then your user: 1) SELECT organisationunitid, name FROM organisationunit where parentid is null; LET'S SAY THE ANSWER IS 18 2) SELECT userid from userrole where name='Superuser'; LET'S SAY THE ANSWER IS 32 Given those values, you should be able to do this: 3) UPDATE usermembership SET organisationunitid = 18 WHERE userinfoid = 32; On Mon, Mar 12, 2018 at 6:21 PM, Georgi Chakarov <geo...@logicaloutcomes.net > wrote: > We got a database dump. > > > > *From:* Knut Staring [mailto:knu...@gmail.com] > *Sent:* Monday, March 12, 2018 7:07 PM > *To:* Georgi Chakarov <geo...@logicaloutcomes.net> > *Cc:* DHIS 2 developers <dhis2-d...@lists.launchpad.net>; DHIS 2 Users > list <dhis2-users@lists.launchpad.net> > *Subject:* Re: [Dhis2-devs] URGENT: Data capture and Maintenance org > units Access > > > > Do you have direct access to the database? > > > > On Mon, Mar 12, 2018, 17:47 Georgi Chakarov <geo...@logicaloutcomes.net> > wrote: > > Hello all, > > > > For some testing purpose, I gave my superuser access to ONE org unit at > the lowest level. Now, I and (*all other users*) see only this org unit > for all data entry and maintenance apps, which is a bit strange. > > Does anyone know how do I regain access to the entire org unit tree again? > > > > > > > > > Georgi Chakarov, CIA | geo...@logicaloutcomes.net | +1-647-478-5634 x 104 > <(647)%20478-5634> | LogicalOutcomes c/o Centre for Social Innovation, 720 > Bathurst Street, Toronto Canada M5S 2R4 > <https://maps.google.com/?q=720+Bathurst+Street,+Toronto+Canada+M5S+2R4&entry=gmail&source=g> > | *You may unsubscribe from receiving commercial electronic messages from > LogicalOutcomes by emailing **i...@logicaloutcomes.net* > <i...@logicaloutcomes.net> > > > > _______________________________________________ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : dhis2-d...@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > > -- Knut Staring Department of Information, Evidence and Research World Health Organization, Geneva, Switzerland Office: +41 22 791 3683 <+41%2022%20791%2036%2083> Mob1: +33 6 4434 2931 <+33%206%2044%2034%2029%2031> Mob2: +47 9188 0522 Skype: knutstar
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-users Post to : dhis2-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-users More help : https://help.launchpad.net/ListHelp