mirror of
https://github.com/Mailu/Mailu.git
synced 2025-02-19 19:10:25 +02:00
Allow one manager to add another to the domain, fixes #203
This commit is contained in:
parent
07c789fc8b
commit
e1533a12e3
@ -23,7 +23,7 @@ def manager_create(domain_name):
|
||||
]
|
||||
if form.validate_on_submit():
|
||||
user = models.User.query.get(form.manager.data)
|
||||
if user not in available_users:
|
||||
if user.email not in [user.email for user in available_users]:
|
||||
flask.abort(403)
|
||||
elif user in domain.managers:
|
||||
flask.flash('User %s is already manager' % user, 'error')
|
||||
|
Loading…
x
Reference in New Issue
Block a user