Welcome Guest, Not a member yet? Register   Sign In
Permission Handling Library
#2

[quote pid="363029" dateline="1554233786"]
Hi MGatner!

I have spent all my day integrating your library into my CI4 project. I managed to install your library and also successfully used the mayCreate, mayUpdate methods, etc. Everything seems to work perfect!

I only need one thing to finish integrating your library into my project: knowing exactly how the octal mode works to assign permissions.

Unfortunately the documentation you provide on your Github is short and not very detailed, so I have not been able to understand how exactly to assign permissions using the chmod-style four-digit octal mode. The only thing that is more or less clear to me is that the 1st digit is responsible for granting permission to create a record. The other digits are quite obscure.

I have managed to identify the octal mode for several combinations of permissions, although obviously I'm missing many:

  1. 00000. No privilege
  2. 07777. create, read, update, delete, list
  3. 02007. create, read, update, delete
  4. 07772. create, update, delete, list
  5. 04007. read, update, delete, list
  6. 02222. create, update, delete
  7. 04222. update, delete, list
  8. 00777. read, update, delete
  9. 07774. create, read, list
  10. 00002. update, delete
  11. 02224. create, read
  12. 07000. create, list
  13. 04444. read, list
  14. 02000. create
  15. 00004. read
  16. 04000. list

I admit that I have managed to identify these octal combinations without knowing what I am doing. I've done it blindly, simply swapping one number for another.

Could you please extend your documentation on this, explaining in more detail how to assign one permission or another, or various combinations of them?

I am sure that you have used your library in some of your projects. It would be very helpful to the community if you could upload to your Github a practical and complete examples of how you have integrated your library. Could we see a model and a controller for any of your projects using your library in octal mode, and maybe a SQL dump of the database?

I think your library is great and powerful, my God, and I think it absolutely deserves that we talk about its documentation and extend it for the good of all.

Thank you very much!
[/quote]
Reply


Messages In This Thread
Permission Handling Library - by MGatner - 04-02-2019, 12:36 PM
RE: Permission Handling Library - by ProfesorBerkeley - 11-10-2021, 05:00 PM
RE: Permission Handling Library - by MGatner - 11-16-2021, 05:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB