Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #624 (closed task: fixed)

Opened 2 years ago

Last modified 2 years ago

Edit Tribe Permission Branch

Reported by: bwolfe Assigned to: jmiranda
Priority: major Milestone: (Completed) OpenMRS 1.3
Component: OpenMRS Code Base Keywords:
Cc: Introductory Ticket:
Code Review Status:

Description

This currently uses roles as the guiding force of the permission. This should be changed to use Privileges instead. Roles are just a grouping agent for privileges. The meat of permissions checking and authorization should always be done with privileges.

The current code loops over a user's roles. This does not take into account roles inherited from other roles. If you did privilege based checking, the code would be simplified to:

 (pseudo code)
 for each privilege in tribeEditPrivileges {
   if (Context.hasPrivilege(privilege))
     authorized = true;
 }

The Context.hasPrivilege check combines the authenticated/anonymous role's privileges and all inherited privileges from roles to determine if the current user has that privilege.

Change History

02/19/08 17:42:29 changed by bwolfe

This change needs to be run by James Arbaugh for feasibility.

03/14/08 14:23:11 changed by bmamlin

See also #652

04/15/08 00:08:32 changed by jmiranda

  • status changed from new to assigned.

04/15/08 00:08:38 changed by jmiranda

  • status changed from assigned to closed.
  • resolution set to fixed.

04/15/08 00:47:45 changed by bwolfe

  • milestone set to OpenMRS 1.3.

This was committed in [3837]