Should we include something like this in the "welcome" app? It's a basic function for managing users, roles, and permissions. It uses smartgrid for users (with a link to db.auth_membership) and a standard grid for roles and permissions -- each loaded into a separate Bootstrap tab via LOAD(). (Note, currently there is no menu item linking to it, so that would have to be added.)Anthony
--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-develop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<manage_auth.zip>
wasn't web2admin going to be considered for a "better" management ?
Should we include something like this in the "welcome" app? It's a basic function for managing users, roles, and permissions. It uses smartgrid for users (with a link to db.auth_membership) and a standard grid for roles and permissions -- each loaded into a separate Bootstrap tab via LOAD(). (Note, currently there is no menu item linking to it, so that would have to be added.)
Anthony--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-develop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
+1
Did you also consider a plugin?
<manage_access_control.zip>
<manage_access_control.zip>
Your code for manage has been moved to class Auth. The user.load is implicit in default.py.
Please check it but, before we make this stable, I think we should consider make this code more general. Why should it be limited to edit the auth tables?
auth.requires_membership(auth.settings.manager_group)(lambda: None)()
if not self.has_membership(self.settings.manager_group_id):
@auth.requires_membership('superman')def manage():return dict(grid=SQLFORM.smartgrid(db.get(request.args(0)) or redirect(URL('index'))))
I don't have any idea on how this works (from the user point of view). How to I access this manage function :) ?
What's the error. If you not look for a .load view because it contains the logic:return grid if request.extension=='load' else dict(grid=grid)
auth.settings.auth_manager_role = 'Access Control Manager'
auth.settings.manager_actions = dict(
db=dict(role='Admin', heading='Manage Database', tables=db.tables),
things=dict(role='Thing Manager', heading='Manage Things', db=other_db,
tables=['things', 'stuff', 'more_stuff']),
content=dict(role='Content Manager', tables=[content_db.articles, content_db.recipes, content_db.comments])
)
OK, I've made (what I think are) additional improvements in the attached patch. Now there is just one new appadmin function -- "manage".
Thanks. I haven't look at your book patch, but if it helps, here's a nicer write-up: https://groups.google.com/forum/#!msg/web2py/HdvSyZCJad4/5y1xQw3D2RgJ. Note, one difference in particular from my description in this thread -- you can in fact override the default /manage/auth action (though you will still get some of the specialized customizations of the labels, etc. in that case). I mentioned this change in the second post of the above linked announcement.
Anthony
On Monday, June 24, 2013 10:01:21 AM UTC-4, Tim Richardson wrote:
auth.settings.manager_actions = dict(db_admin=dict(role='admin',heading='Manage Database',tables = db.tables))
(T('User Management v2'),False,URL('appadmin','manage',args=['db_admin']))
--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py-developers/e0BaYjlHsO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py-develop...@googlegroups.com.
![]() Tim Richardson, Director Mobile: +61 423 091 732 Office: +61 3 8678 1850 GrowthPath Pty Ltd ABN 76 133 733 963 |
In this case it is necessary even in an app not explicitly using components, because the new privileged-user database maintenance does use them.Perhaps every app needs to update web2py.js