Skip to content
Snippets Groups Projects
Verified Commit bd27a38d authored by nd's avatar nd
Browse files

enforce access acls

parent 18474b9e
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,9 @@ def login():
flash('Login name or password is wrong')
return redirect(url_for('.login'))
user = User.from_ldap(conn.entries[0])
if not user.is_in_group(current_app.config['ACL_SELFSERVICE_GROUP']):
flash('You do not have access to this service')
return redirect(url_for('.login'))
session['user_uid'] = user.uid
session['logintime'] = datetime.datetime.now().timestamp()
return redirect(request.values.get('ref', url_for('index')))
......
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