← Back to team overview

dhis2-devs team mailing list archive

Re: URGENT: Data capture and Maintenance org units Access

 

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 <georgi@xxxxxxxxxxxxxxxxxxx
> wrote:

> We got a database dump.
>
>
>
> *From:* Knut Staring [mailto:knutst@xxxxxxxxx]
> *Sent:* Monday, March 12, 2018 7:07 PM
> *To:* Georgi Chakarov <georgi@xxxxxxxxxxxxxxxxxxx>
> *Cc:* DHIS 2 developers <dhis2-devs@xxxxxxxxxxxxxxxxxxx>; DHIS 2 Users
> list <dhis2-users@xxxxxxxxxxxxxxxxxxx>
> *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 <georgi@xxxxxxxxxxxxxxxxxxx>
> 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 | georgi@xxxxxxxxxxxxxxxxxxx | +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 **info@xxxxxxxxxxxxxxxxxxx*
> <info@xxxxxxxxxxxxxxxxxxx>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> 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

Follow ups

References