mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-09-16 07:12:30 +00:00
Fix the user role checking in History routes
This commit is contained in:
@@ -1324,7 +1324,7 @@ def admin_manageaccount():
|
||||
@operator_role_required
|
||||
def admin_history():
|
||||
if request.method == 'POST':
|
||||
if current_user.role != 'Administrator':
|
||||
if current_user.role.name != 'Administrator':
|
||||
return make_response(jsonify( { 'status': 'error', 'msg': 'You do not have permission to remove history.' } ), 401)
|
||||
|
||||
h = History()
|
||||
|
Reference in New Issue
Block a user