CodeIgniter Forums
Myth:Auth extended permission check - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: Myth:Auth extended permission check (/showthread.php?tid=76678)



Myth:Auth extended permission check - korgoth - 06-09-2020

Hey guys,

in a project we are starting now there is a bit of a awkward permission check requirement. Each users permissions are different depending on what operations he wants to perform on which "object" - where objects are dynamic from another database. IE one user should have a "view order" permission for one store, but is not granted that permission for say another store. 

Heres the tables as drawn in the project specification: 

[img][Image: tbnhM8v.png][/img]

LogisticsClients (or stores) are essentially groups (which the myth:auth supports) but they are dynamic, and its not convenient to add say 10 groups for each client that appears.

I really wanted to use Myth:Auth for this project, since it handles an enormous amount of jobs. Do you have any ideas how can i extend the Auth lib, or how can i workaround this situation so that i can still use the  library but achieve the result needed


RE: Myth:Auth extended permission check - MGatner - 06-09-2020

You might check out Tatter\Permits and see if that meets your needs. It’s compatible with Myth:Auth and helps handle some of those object-level permissions.


RE: Myth:Auth extended permission check - korgoth - 06-09-2020

Ive looked into it in the past, just read the docs again on git hub - i just cant wrap my head around how this is working Undecided