privilege "edit concepts" not in core

Hello!

in the legacyui I see that the privilege “Edit Concepts” is often required to access a page.

However its not added via the https://github.com/openmrs/openmrs-core/blob/2.0.x/api/src/main/java/org/openmrs/util/PrivilegeConstants.java

Should it be? Or is adding the privilege part of the implementers job?

I don’t ever remember there being an “Edit Concepts” privilege; it’s supposed to be “Manage Concepts”.

(Searching github implies that maybe Edit Concepts did exist from versions 1.3.0.12 to 1.3.0.14 of the platform, back in 2008…)

So, I think the fix is to change the UI code to check for Manage Concepts rather than Edit Concepts.

1 Like

Thanks @darius !!

Do you also know why the “Purge xxx” privileges do not have the @AddOnStartup in

?

They are required in the API to purge concepts, - sources, - reference terms.

So giving a user the “Manage xxx” privileges is enough to add/edit/retire but not to purge. The implementer would need to add this privilege himself at the moment.

Sorry, I don’t remember the exact reasoning behind this.

Speculating, we were probably thinking that we want to make purging hard to do, and nudge people to just retire/delete, so this was an extra hoop that people would have to jump through.

-Darius

Just in case: :smile: https://marc.info/?l=openmrs-dev&m=139455164015860&q=raw

1 Like

nice! good to know :grin: