There's also some built-in functionality for this:

auth.settings.auth_manager_role = 'some_admin_role'

Then go to /myapp/appadmin/manage/auth, and anyone with the 
"some_admin_role" role will be able to manage users, groups, and 
permissions via grids.

This functionality can be generalized via auth.settings.manager_actions -- 
see 
http://web2py.com/books/default/chapter/29/09/access-control#Application-Management-via-privileged-users--Experimental-.

Anthony

On Monday, December 7, 2015 at 7:19:46 PM UTC-5, 黄祥 wrote:
>
> i think you can create your own controller for it
> e.g.
> controllers/admin.py
> def user():
> table = db.auth_user
> grid = SQLFORM.grid(table)
> return locals()
>
> # group
> def group():
> table = db.auth_group
> grid = SQLFORM.grid(table)
> return locals()
>
> # membership
> def membership():
> table = db.auth_membership
> grid = SQLFORM.grid(table)
> return locals()
>
> # permission
> def permission():
> table = db.auth_permission
> grid = SQLFORM.grid(table)
> return locals()
>
> note the code above is not work when using 
> auth.settings.everybody_group_id because it seems that auth settings 
> everybody group id is assigned when user is register with the sign up form, 
> so you must assigned it manually
>
> best regards,
> stifan
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to