Access management
Access management in openIMIS
The three dimensions of access in openIMIS
openIMIS controls what users can see and do through three complementary dimensions:
Dimension | What it controls | Typical use | How it works in practice |
|---|---|---|---|
| What actions a user is allowed to perform | Submit claims, view policies, approve, etc. | Based on roles and specific permissions |
| Which part of the organisation the user can see | District, Region, Health Facility | Usually filters lists and searches automatically |
| Specific business objects the user is responsible for | One or more Health Facilities | Explicit link between a user and concrete objects |
How the access logic works
The three dimensions work together, but with a clear priority rule:
SuperAdmin: have all perms
General permissions (the classic role-based rights) give broad access. If a user has the general permission for an action, they can perform it (within the limits of their location assignments).
Business Access only comes into play when the user does not have the general permission. In that case, the system checks whether the user has a specific Business Access record combined with a Business Access permission for that action.
In short: General permission = broad access (subject to locations). Business Access + UBA-specific permission = alternative, more granular access path that is used only when the general permission is not granted.
Real-life example – Submitting claims for a Health Facility
Case 1 – User has the general permission A user who has the general “submit claims” permission can submit claims for the Health Facilities they are allowed to see through their location assignments. No Business Access record is required.
Case 2 – User does not have the general permission A user without the general “submit claims” permission can still submit claims, but only for the Health Facilities where they have:
A Business Access record linking them to the Health Facility (as claim_admin), and
The specific Business Access permission to submit claims (uba_ca_claim_submit).
This way, organisations can give very precise access without granting the broad general permission.
Why this approach improves on the previous model
Previously, Claim Administrators and Officers relied on a role plus a dedicated model that filtered data via get_queryset. This was rigid and hard to adapt when responsibilities changed between Health Facilities.
The new Business Access approach offers more flexibility:
Users with general permissions continue to work as before.
Users without general permissions can still be given targeted access to specific Health Facilities through Business Access + specific permissions.
Reassigning someone to a different Health Facility is simple: just add or remove the Business Access record.
Everything remains fully auditable.
Summary
openIMIS manages access through three dimensions — Permissions, Locations, and Business Access — that work together with a clear rule: general permissions provide broad access, while Business Access provides a precise alternative path when general permissions are not granted.
The most common use case is giving Claim Administrators (and similar roles) access to the specific Health Facilities they are responsible for, without necessarily giving them wide general permissions.
This improved logic is now available in the core of the system (openimis-be-core_py).
Question:
should entity (mutli tenant) be managed by business permission or should we have a dedicated field on the use
should we transform TechnicalUser (unused) to ClientUser (Insuree … ) to ensure the we don’t mix client and real user and we could have different Auth methods (could be achieved with is_staff but I fear missconfig give too much acces to client)
Should we create a “contact” table to have CA without user ? (could be reused for practitioner) or have a user that cannot login
reuse individual + some kind of many to many
Change to be done:
Action upon deletion of an user
all related access must be “deleted“ too (flag deleted to True)
Action upon deletion of an user with business acess
in all case the relation between the users and the external partner must de “deleted“ too
Quesiton: if the users are only related to that given external partner (have no relation to other external partner) then the user must be “deactivated”
group / herachy management