I actually read that section two days ago, when the requirements were still being defined. I don't know why I forgot it.
Probably the ominous warning *"The creation of the group can be disabled [...] although we do not suggest doing so."* got me thinking why and the rest slipped my mind. Later I found it wasn't so ominous after all: https://groups.google.com/forum/#!msg/web2py/C5BHvXMyq7s/YZ6Gdx78mesJ On Wednesday, May 4, 2016 at 3:24:50 PM UTC-5, Niphlod wrote: > > http://web2py.com/books/default/chapter/29/09/access-control#Authorization > > On Wednesday, May 4, 2016 at 9:59:13 PM UTC+2, Antonio Salazar wrote: >> >> Thank you! >> >> For some reason I was thinking of this setting as a boolean, and figuring >> how to use a callback to rename the group :/ >> >> P.S. for completeness. >> >> In db.py I changed this: >> auth.settings.create_user_groups = None >> >> to this >> auth.settings.create_user_groups = 'user_%(username)s' >> >> >> >> >> On Wednesday, May 4, 2016 at 2:01:16 PM UTC-5, Niphlod wrote: >>> >>> from the source it seems that the setting >>> >>> create_user_groups >>> >>> which has a default of >>> >>> "user_%(id)s" >>> >>> can be used. in your case it seems that setting it to user_%(username)s >>> should do the trick. >>> >>> On Wednesday, May 4, 2016 at 8:48:49 PM UTC+2, Antonio Salazar wrote: >>>> >>>> I've disabled user group creation, but now I need user-specific >>>> permissions, so I'm going to re-enable it and create the missing user >>>> groups. I'd really like the groups to be user_[username] instead of >>>> user_[user_id]. >>>> Is there an upgrade-friendly way to base the group name on something >>>> other than the user id? >>>> >>>> I know it's best practice to use the id because it's unique, but in my >>>> case, the username is also unique and invariable. I'd bear the slight risk >>>> of inconsistency in exchange for human-readable group names. >>>> >>> -- 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.

