Hi Sam,

thanks for bringing this up. It is an issue we need to handle better.

There is a trick to finding the complete set of authorities per version.

   - Start up a DHIS instance of the desired version.
   - Create a new user role, give it the name AAA, and select all available
   authorities, click Save.
   - Then execute this SQL:

select ua.authority
into _auths
from userroleauthorities ua
inner join userrole ur on ua.userroleid=ur.userroleid
where ur.name = 'AAA';


You can repeat the process on the target DHIS 2 version instance, and then
copy the tables into a single database and use SQL (..where not in..) to
compare them.

You can also save this to a file and compare using CSV/Excel:

psql -d dhis2 -U dhis -c "select * from _auths"  > auths.txt

We can also work on this on our side and include pruning of obsolete
authorities in a DHIS startup routine.

best,

Lars
​

On Tue, Feb 7, 2017 at 2:37 AM, Sam Johnson <samuel.john...@qebo.co.uk>
wrote:

> Hi Devs,
>
>
>
> If possible, I’d be very grateful for some advice around authorities in
> 2.25.
>
>
>
> In order to help prepare for PSI’s upgrade to 2.25, we’ve done an analysis
> of changes in Authorities between 2.22 and 2.25.  I couldn’t find a
> database table containing Authorities, and the list of Authorities in the
> DHIS2 documentation doesn’t appear to have been updated since version 2.22,
> so I’ve scraped the ‘Authorities’ drop-down in the ‘Create Role’ screen to
> obtain lists of Authorities in 2.22 and 2.25 for comparison.
>
>
>
> The following Authority changes seem fairly straightforward, and were
> documented as part of DHIS2 releases:
>
>
>
> *RETIRED (functionality no longer exists)*
>
> ·         View data browser
>
> ·         See Data Set Maintenance module
>
> ·         See Organisation Unit Maintenance module
>
> ·         Scheduling case aggregate query builder
>
> *INTRODUCED (new functionality)*
>
> ·         Delete External Map Layer
>
> ·         Add/Update Private External Map Layer
>
> ·         Add/Update Public External Map Layer
>
> ·         Add/Update Legend
>
> ·         Delete Legend
>
> ·         Delete Legend Set
>
> ·         Add/Update Private Legend Set
>
> ·         Add/Update Public Legend Set
>
> ·         Metadata sync
>
> ·         Add/Update Predictor
>
> ·         Delete Predictor
>
> ·         Delete Program Indicator Group
>
> ·         Add/Update Private Program Indicator Group
>
> ·         Add/Update Public Program Indicator Group
>
> ·         Add/Update Push Analysis
>
> ·         Delete Push Analysis
>
> ·         See Usage Analytics module
>
>
>
> I’m guessing the following Authorities have been retired because they
> duplicate existing (more refined) Authorities?   Could you confirm whether
> this guess is correct?
>
> *RETIRED AS REDUNDANT?:*
>
> ·         Option Set Management
>
> ·         Constant Management
>
> *DO THESE EXISTING AUTHORITIES MAINTAINED IN 2.25 PROVIDE THE SAME
> PERMISSIONS?*
>
> ·         Delete Option Set
>
> ·         Add/Update Private Option Set
>
> ·         Add/Update Public Option Set
>
>
>
> ·         Add Constant
>
> ·         Delete Constant
>
>
>
> I’m not sure what the following new set of Authorities govern – I’ve
> looked at Option Sets (as distinct from Category Option Group Sets), but
> can’t find any concept of ‘Groups’ in Options/Option Sets…  What do these
> new authorities control?
>
> *INTRODUCED*
>
> ·         Delete Option Group
>
> ·         Add/Update Private Option Group
>
> ·         Add/Update Public Option Group
>
> ·         Delete Option Group Set
>
> ·         Add/Update Private Option Group Set
>
> ·         Add/Update Public Option Group Set
>
>
>
> The following appear to have been RETIRED prior to the 2.25 release –
> could you confirm that these Authorities have indeed been retired (rather
> than just missed off the drop-down of Authorities in the ‘Create Role’
> screen)?  If they have been retired, which Authority now manages these
> permissions?
>
> *RETIRED?  (AND REPLACED BY?)*
>
> ·         Add Relationship Type – now covered by ???
>
> ·         Delete Relationship Type – now covered by ???
>
>
>
> ·         Scheduling send messages – now covered by ???
>
>
>
> ·         Add/Update Section – now covered by ???
>
> ·         Delete Section – now covered by ???
>
>
>
> ·         Add/Update Tracked Entity – now covered by ???
>
> ·         Delete Tracked Entity – now covered by ???
>
>
>
> ·         Manage Tracked Entities – now covered by ???
>
> ·         Update Tracked Entities – now covered by ???
>
>
>
> ·         Delete Tracked Entity Attribute – now covered by ???
>
> ·         Add/Update Private Tracked Entity Attribute – now covered by ???
>
> ·         Add/Update Public Tracked Entity Attribute – now covered by ???
>
>
>
> ·         Manage Tracked Entity Instance Reminders
>
>
>
> ·         M_dhis-web-menu-management
>
>
>
>
>
> We’d be very grateful for any advice or feedback you can provide on the
> questions above, as it would be a huge help in adjusting our own Roles to
> ensure permissions work smoothly during our 2.25 upgrade.
>
>
>
> (Once the dust has settled on our 2.25 upgrade, I’d also be very happy to
> re-do this exercise for 2.26, and share it with this Dev list.)
>
>
>
> Many thanks,
>
>
>
> Sam.
>
>
>
>
>
> *Samuel Johnson - *Consultant
>
> —————————————————
>
> Qebo Ltd
>
> 288a Gloucester Rd, Bristol BS7 8RP
>
> Phone: +44 7734 960 923 <+44%207734%20960923>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org <https://www.dhis2.org/>
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to