New plugin: Authman

已查看 83 次
跳至第一个未读帖子

Bernhard Radermacher

未读,
2017年10月15日 09:12:402017/10/15
收件人 web2py-users
I developed a little plugin to facilitate authorization management. It can be found at:


I appreciate any comments.

Anthony

未读,
2017年10月15日 09:40:272017/10/15
收件人 web...@googlegroups.com
Very nice. Thanks for posting. This appears to be much more complete, but note that every app includes some basic functionality for managing users, roles, and permissions via the URL /myapp/appadmin/manage/auth. All you have to do is include the following line in a model:

auth.settings.auth_manager_role = 'my_auth_admin_role'

and anyone in the 'my_auth_admin_role' group will have access to the functionality. The above URL can also be accessed by anyone who is logged into the admin app even if no auth.settings.auth_manager_role has been set.

This is a special case of the more general auth.settings.manager_actions functionality described at http://web2py.com/books/default/chapter/29/09/access-control#Application-Management-via-privileged-users--Experimental-.

Anthony

Bernhard Radermacher

未读,
2017年10月15日 11:30:092017/10/15
收件人 web2py-users
That is correct. But this accesses the respective auth tables directly.

authman adds additional tables, that allow

- extensive editing before activation
- roles can be included in other roles, thereby creating an organizational structure. For example:
  • Role Accounting Manager includes
    • Role A/P clerk
    • Role A/R clerk
In addition the magic role 'root' gets all permissions... that works nice for testing when you just don't want to be bothered by auth checks.

Bernhard Radermacher

未读,
2017年10月15日 11:38:372017/10/15
收件人 web2py-users
Forgot to mention that assignment is a bit easier, too:

António Ramos

未读,
2017年10月17日 04:18:052017/10/17
收件人 web...@googlegroups.com
I was looking a long time ago for a RBAC that could permit a group to belong to a group...


Nice job

Regards

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bernhard Radermacher

未读,
2017年10月17日 04:20:022017/10/17
收件人 web2py-users
Thanks.

Hope it works for you.

Let me know if you have any questions.
回复全部
回复作者
转发
0 个新帖子