|
|
|
@ -46,5 +46,25 @@ def set_password(): |
|
|
|
|
ldap_functions.set_password(username, password) |
|
|
|
|
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__': |
|
|
|
|
app.run(debug=True, host='0.0.0.0') |
|
|
|
|