Hello Anthony, I have some questions about the new feature you present here :
"Just create an Auth group that is to be allowed access to this page and > specify the "role" of that group in auth.settings.auth_manager_role" > I think the correct spelling is *auth.settings.manager_group_role*, am I right? "First, there is /appadmin/manage/auth, which is a special page > specifically for managing Auth users, roles, and permissions" > When I add auth.settings.manager_group_role = 'manager' on my db.py, and the I log in with a "manager user", when I go on /appadmin/manage/auth I can manage all tables in my database, not only users roles and permissions. Have I missed something? Thank you Le vendredi 14 juin 2013 18:13:17 UTC+2, Anthony a écrit : > > Trunk now includes some new functionality in appadmin to allow specially > designated administrative users of an app to manage specific tables in the > database. > > > <https://lh4.googleusercontent.com/-B1AhpU7hOFg/UbtG1BQ0I9I/AAAAAAAABf0/f4tl0Is3TN4/s1600/appadmin.png> > > First, there is /appadmin/manage/auth, which is a special page > specifically for managing Auth users, roles, and permissions (see > screenshot above). Just create an Auth group that is to be allowed access > to this page and specify the "role" of that group in > auth.settings.auth_manager_role. Then anyone assigned to that Auth group > will have access to the page. > > You can also create any number of custom db management pages much like the > /appadmin/manage/auth page via the new auth.settings.manager_actionssetting, > which is a dict of dicts. An example looks like this: > > 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]) > ) > > The keys of the auth.settings.manager_actions dict are URL args that go > after /appadmin/manage -- so the above allows /appadmin/manage/db, > /appadmin/manage/things, and /appadmin/manage/content. > > Each item in auth.settings.manager_actions is a dict with "role", > "heading", "tables", and "db" keys: > > - *role*: Specifies the "role" of the Auth group that should be > allowed to access the page. > - *heading*: Specifies the heading to appear on the page, though it is > optional -- if there is no "heading", it will use 'Manage %s' % > request.args(0).replace('_', ' ').title() instead. > - *tables*: A list of DAL tables to include on the page. It can be > either a list of table names or actual DAL table objects. > - *db*: Specifies the DAL object that contains the tables to be > managed (you can specify the DAL object itself, or its variable name, > which > will be looked up in globals()). The "db" key is optional -- if > "tables" is a list of DAL table objects, the table objects themselves > determine the db; and if "tables" is a list of table names, auth.db will > be > used if no "db" key is specified (auth.db is the database used for the > Auth > tables, which is typically the main app database). > > Note, access to these pages is controlled by the app's own Auth system, > not by the "admin" app (as with the rest of appadmin). > > Try it out and let us know if you run into any problems. > > Anthony > > > -- --- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.