I have done what you suggest, except for the cleanup-script. I added auth.settings.bulk_register_enabled = False
We can than leave to the developer to do something like: self.setting.bulk_register_enabled = auth.has_membership(role='whatever') On Sunday, 28 June 2015 10:05:45 UTC-5, Massimo Di Pierro wrote: > > OK but notice, anybody, not even logged in, can already register using > somebody else's email address and that person would receive an unwanted > email with a link to verify their email. Unless > registration_requires_approval is set False. > > So perhaps the condition should only kick in if > registration_requires_approval is False. > > On Sunday, 28 June 2015 09:57:17 UTC-5, Anthony wrote: >> >> I don't think this should be exposed by default for all users -- it >> should be disabled by default and only enabled when done so explicitly by >> the developer. I would think you would only want to expose this kind of >> functionality to admin/trusted users -- otherwise, you are providing a way >> for users to spam people and load your db.auth_user table with an unlimited >> number of phantom registrations. A few other suggestions: >> >> - Provide an easy API for specifying a required Auth role or set of >> roles that are allowed access to this functionality (as I think in most >> cases you would want to restrict its usage) -- something like >> auth.settings.bulk_register_roles. >> - Add an option to specify a limit on the number of users that can be >> registered at a time (with some reasonable default, such as 100). >> - Maybe provide a script or a function in admin/appadmin that can >> clean up db.auth_user by expunging bulk registrations that were not >> completed within some (configurable) time frame. >> - Apply auth.settings.formstyle to the form. >> >> Anthony >> >> On Sunday, June 28, 2015 at 10:19:46 AM UTC-4, Massimo Di Pierro wrote: >>> >>> Hello web2py users, >>> >>> a new feature is in trunk, please help us test it. >>> Originally developed here https://github.com/web2py/web2py/pull/985 as >>> "invite" has been renamed as "bulk_register". It is available to all web2py >>> applications at this user: >>> >>> http://127.0.0.1:8000/welcome/default/user/bulk_register >>> >>> It allows you to specify a list of emails and an email messages. Those >>> people will be registered and will receive the email with a link to >>> complete registration. >>> >>> Please send comments, suggestions for improvements, bug reports. >>> >>> Massimo >>> >> -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.