Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update backend_structured/routes.py
Browse files
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'
|
| 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
|