Closed GasparPizarro closed 5 years ago
@GasparPizarro why don't we add an optional setting REGISTRATION_ADMINS_GETTER
(or similar) which holds a path to a function to get additional admins from the DB or wherever they are listed?
# settings.py
...
REGISTRATION_ADMINS_GETTER = "utils.get_reg_admins_from_db"
...
# utils.py
def get_reg_admins_from_db(): # args tbd
return ['admin@admin.com']
would you be interested in adding this functionality?
Yes I am, give me some time to develop it and make a pull request.
thanks!
It would be nice that the registration admins list could be pulled from the user model database instead of from the
settings py
. The use case for this is that the admin of an app (who would be different from the developer of the app) could add users for the registration approval without touching source code or having to enter the host machine. My proposal is that the registration admins would be the users withis_superuser=True
, and if there are no users matching the criterion, the regular (REGISTRATION_ADMINS or ADMINS
).Thoughts on this?