Skip to content
Snippets Groups Projects
Commit 7cdf8572 authored by Julian's avatar Julian
Browse files

Enabled admins to creates invite links for all roles, fixes #61

parent fd043890
No related branches found
No related tags found
No related merge requests found
...@@ -64,8 +64,12 @@ def index(): ...@@ -64,8 +64,12 @@ def index():
@invite_acl_required @invite_acl_required
def new(): def new():
user = get_current_user() user = get_current_user()
allow_signup = user.is_in_group(current_app.config['ACL_SIGNUP_GROUP']) or user.is_in_group(current_app.config['ACL_ADMIN_GROUP']) if user.is_in_group(current_app.config['ACL_ADMIN_GROUP']):
roles = Role.query.filter(Role.moderator_group_dn.in_(user.group_dns)).all() allow_signup = True
roles = Role.query.all()
else:
allow_signup = user.is_in_group(current_app.config['ACL_SIGNUP_GROUP'])
roles = Role.query.filter(Role.moderator_group_dn.in_(user.group_dns)).all()
return render_template('invite/new.html', roles=roles, allow_signup=allow_signup) return render_template('invite/new.html', roles=roles, allow_signup=allow_signup)
@bp.route('/new', methods=['POST']) @bp.route('/new', methods=['POST'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment