DynamicRoleBasedAuthorizationNETCore icon indicating copy to clipboard operation
DynamicRoleBasedAuthorizationNETCore copied to clipboard

[Idea] new feature

Open danijel88 opened this issue 3 years ago • 3 comments

Hello, I would like to suggest one new feature here. Imaging big applications which has mother company with child companies, all of them has HR, but with different access. HR from Mother company can create all users for all other child companies and assign them all roles. But HR from Child company can create only users for their company and only assign some specific roles, example(Warehouse, master data ...) Maybe to implement some feature where based on role if user can create new user to distinguish which roles can assign to this user. What do you think, do you see any benefit of that ?

Regards, Danijel

danijel88 avatar Mar 30 '21 12:03 danijel88

Hey @danijel88

It's a good idea. To implement this functionality, hierarchical organization (or departments) should be introduced and users assigned to the organization tree. For example, a user with an admin role that belongs to a higher node in the tree structure has a higher access level than a user with an admin role that belongs to a lower node.

I think it's beyond the scope of this library, however, it can be implemented separately as an extra project and package.

mo-esmp avatar Mar 31 '21 09:03 mo-esmp

Hi, Since not a lot of free time, I had refactor some code. Actually it is written blind code, only tested by running app without tests. https://github.com/danijel88/RoleManagement This is initial Idea any contribution is accepted. Also I had create project with some tasks, please check and if you work on something please update.

danijel88 avatar Jan 24 '22 08:01 danijel88

@danijel88,

Thanks for sharing codes!

mo-esmp avatar Jan 25 '22 08:01 mo-esmp