Role Manager

Job ID: 34174790

Budget: ₹5,000 – ₹30,000 INR

I need a PHP Project using Code Igniter 4 framework exclusively. Our User to role structure is as follows -
Functions -> Modules -> Role -> User
MODULE - A module is a set of few Functions,
ROLE - A role will be a group of a few modules along with some constant parameters called "permission" (fixed for that role)
USER - One or Multiple Roles can be assigned to a user.

The Role Manager should have the following features -
1. Dynamically Assign Roles to the users (Roles and User mapping will be done in a DB Table).
2. New Roles can be created for different modules/purposes.
3. User can access only those functions which are allowed by the Role.
4. The Same function can be used in multiple modules.
5. When a user trying to access a function, the Role Manager will allow the request if that function is assigned to the user otherwise deny the request with an error.
6. If access request is allowed, a union set of permissions should also be available as a variable within that function for imposing response conditions.


Example -
Consider 5 Functions (belongs to same or different controller class) namely F1,F2,F3,F4,F5
Consider 2 Modules, M1 using functions (F1, F2,F3) and M2 using function (F1,F3,F4)
Consider 2 Roles, R1 using module M1 over permission P1 and R2 using modules M2 with permission P2

A user was assigned these 2 roles R1 and R2. Thus he can access functions F1, F2, F3, and F4 but can't access F5

When the user tries to access F1, the permission variable should have P1 and P2 both (since F1 belongs to M1 and M2 both. M1 has P1 and M2 has P2 thus the union set of permission will be P1,P2)
but when the user tries to access F2, the permission variable should have only P1 (since F2 belongs to M1 only and M1 has P1 only)


First, share your DFD and CFD so that we can discuss before assigning.
Related categories: PHP Codeigniter MySQL