swath of changes to remove hidden "id" implementation in favor of hidden "role" RBAC implement

This commit is contained in:
Xevion
2019-12-23 21:48:11 -06:00
parent 99c702c306
commit c1aa3b2272
6 changed files with 24 additions and 37 deletions

View File

@@ -146,24 +146,4 @@ def login():
@app.route('/logout/')
def logout():
logout_user()
return redirect(url_for('index'))
def get_hidden():
return "/hidden{}/".format(app.config['HIDDEN_NUMBER'])
@app.route('/hidden<id>/history')
@login_required
@require_role(roles=['Hidden', 'Admin'])
def hidden_history(id):
if not validate_id(id):
return '<span style="color: red;">error:</span> bad id'
return render_template('hidden_history.html')
@app.route('/hidden<id>/help')
@login_required
@require_role(roles=['Hidden'])
def hidden_help(id):
if not validate_id(id):
return '<span style="color: red;">error:</span> bad id'
return render_template('hidden_help.html')
return redirect(url_for('index'))