openspp-modules icon indicating copy to clipboard operation
openspp-modules copied to clipboard

Restructure the spp_user_roles module to support dynamic setup of user roles by other modules

Open gonzalesedwin1123 opened this issue 1 year ago • 1 comments

Why is this change needed?

The OpenSPP User Roles module is currently set to depend on other modules for the setup of user roles. An issue is introduced by this considering that there is no flexibility in managing variations in access rights based on the implementation requirements. For example, the SP-MIS registrar role have a different access rights defined compared with the registrar role in the Farmer Registry. Since all modules in the spp_user_roles defined in its dependencies will be installed automatically, there is another issue of having modules not applicable for an implementation to be installed.

How was the change implemented?

  • Remove all module specific role definitions in spp_user_roles and move it to the corresponding modules.
  • Remove non-generic dependencies in the spp_user_roles module.

New unit tests

Unit tests executed by the author

How to test manually

Related links

gonzalesedwin1123 avatar Oct 11 '24 01:10 gonzalesedwin1123