Add LDAP group API routes
This commit is contained in:
parent
6cd0ea7bd0
commit
3133114f93
|
@ -46,5 +46,25 @@ def set_password():
|
||||||
ldap_functions.set_password(username, password)
|
ldap_functions.set_password(username, password)
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
@app.route('/add-to-group', methods=['POST'])
|
||||||
|
def add_to_group():
|
||||||
|
check_auth()
|
||||||
|
|
||||||
|
groupname = request.form['groupname']
|
||||||
|
username = request.form['username']
|
||||||
|
|
||||||
|
ldap_functions.add_to_group(groupname, username)
|
||||||
|
return ''
|
||||||
|
|
||||||
|
@app.route('/remove-from-group', methods=['POST'])
|
||||||
|
def remove_from_group():
|
||||||
|
check_auth()
|
||||||
|
|
||||||
|
groupname = request.form['groupname']
|
||||||
|
username = request.form['username']
|
||||||
|
|
||||||
|
ldap_functions.remove_from_group(groupname, username)
|
||||||
|
return ''
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True, host='0.0.0.0')
|
app.run(debug=True, host='0.0.0.0')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user