larxius commited on
Commit
79530c1
·
verified ·
1 Parent(s): 3713086

Update backend_structured/routes.py

Browse files
Files changed (1) hide show
  1. backend_structured/routes.py +2 -2
backend_structured/routes.py CHANGED
@@ -1452,8 +1452,8 @@ def update_user(current_user, user_id):
1452
  if not target:
1453
  return jsonify({'message': 'User not found!'}), 404
1454
 
1455
- if current_user.role not in ('org_admin', 'super_admin', 'admin', 'support_engineer'):
1456
- return jsonify({'message': 'Permission denied'}), 403
1457
 
1458
  if current_user.role == 'org_admin' and target.org_id != current_user.org_id:
1459
  return jsonify({'message': 'Unauthorized to modify this user!'}), 403
 
1452
  if not target:
1453
  return jsonify({'message': 'User not found!'}), 404
1454
 
1455
+ if current_user.role not in ('org_admin', 'super_admin', 'admin'):
1456
+ return jsonify({'message': 'Permission denied. Support Engineers have read-only access to members.'}), 403
1457
 
1458
  if current_user.role == 'org_admin' and target.org_id != current_user.org_id:
1459
  return jsonify({'message': 'Unauthorized to modify this user!'}), 403