Skip to content

Latest commit

 

History

History
96 lines (69 loc) · 5.45 KB

File metadata and controls

96 lines (69 loc) · 5.45 KB
sidebar_position 1

Roles and permissions

Definition

Roles and permissions decide who can do what in Care, and where. A permission is one action, such as "Can Create Patient". A role is a named set of permissions, such as Doctor. You give a user a role inside one boundary, such as a facility or an organization. A user has no access of their own. All access comes from the roles that the user holds.

Key Attributes

Components What it captures
Permission One action that a user can do. Care declares each permission in code, and you cannot change the list.
Role A named set of permissions, such as Doctor or Nurse.
Contexts The boundary types that the role applies in: Facility, Government Organization, or Responsibility.
System The mark on a role that Care supplies. You cannot edit or delete a system role.
Description Free text that explains the purpose of the role.

Permission

Care declares every permission in code, then loads it into the database. You cannot create, edit, or delete a permission. Each permission has a name, such as "Can Manage Users in an Organization", and a context that names the kind of record it applies to.

A permission applies only inside its own context. A permission on a patient does not give access to a facility, because the two use different contexts.

Context Applies to
Generic Actions that are not tied to one kind of record
Facility A facility
Patient A patient
Encounter One encounter
Organization A government organization or a responsibility organization
Facility organization A department or a team inside a facility
Questionnaire A questionnaire

Role

A role is a flat set of permissions. The name of a role carries no meaning of its own. Doctor and Nurse are two different permission sets, and nothing more.

Care supplies the roles in the table below. You can add your own roles, and you can copy a system role to start from. A role must hold at least one permission, and the name of a role must be unique.

Role Purpose Contexts
Doctor Doctor at some facility Facility, Government Organization
Nurse Nurse at some facility Facility, Government Organization
Staff Staff at some facility Facility, Government Organization
Volunteer Volunteer at some facility Facility, Government Organization
Pharmacist Pharmacist at some facility Facility
Administrator Administrator at a given boundary Facility, Government Organization
Facility Admin Administrator of a facility, given to the person who creates the facility Facility
Admin Administrator at the top of the tree Facility, Government Organization
Admin Administrator of a responsibility organization Responsibility
Manager Manager of a responsibility organization Responsibility
Member Member of a responsibility organization Responsibility

Two system roles use the name Admin. The contexts of the role keep them apart.

Contexts

The contexts of a role name the boundary types that you can use the role in. Care shows only the roles that match the boundary when you give a role to a user. A responsibility organization offers only the responsibility roles.

How a user gets access

You give a user a role in one organization, one facility, or one department. The grant reaches the records below that point in the tree. A role at a district reaches every facility in that district. A role at one facility reaches only that facility and its departments.

A user can hold many roles at the same time. The access of the user is the sum of all the roles that reach the record. A grant can also carry an expiry date, after which the grant ends.

You cannot give a user a role that holds more permissions than you hold yourself at that boundary.

Permissions

The permissions below control the roles and permissions themselves.

Permission Description System Roles
Can Manage Users in an Organization Add a user to an organization, change the role of a user, and remove a user. Admin, Administrator, Facility Admin, Admin (responsibility)
Can Manage Connected Role Organizations Manage the users of the responsibility organizations that this organization manages. Admin (responsibility), Manager (responsibility)
Can List Users in an Organizations See the users of an organization and the role of each user. Facility Admin, Admin, Staff, Doctor, Administrator, Nurse, Volunteer, Pharmacist, Admin (responsibility), Manager (responsibility)

Only a super user can create, change, or delete a role. Every signed-in user can read the list of roles and the list of permissions.

:::note Care refuses a change to a system role, and it refuses a request to delete a system role. :::

Related