Admins should not be able to modify Super Admins Strapi 5
Hi! 👋 
      
Firstly, thanks for your work on this project! 🙂

Today I used [patch-package](https://github.com/ds300/patch-package) to patch `@strapi/admin@5.10.4` for the project I'm working on.

I have the issue that already was described here: https://github.com/strapi/strapi/issues/16832. After the upgrade to Strapi 5 I realized that the problem still persists so I created another patch.

Here is the diff that solved my problem:

```diff
diff --git a/node_modules/@strapi/admin/dist/server/index.js b/node_modules/@strapi/admin/dist/server/index.js
index c194cc6..352f33e 100644
--- a/node_modules/@strapi/admin/dist/server/index.js
+++ b/node_modules/@strapi/admin/dist/server/index.js
@@ -2281,6 +2281,14 @@ attributes)=>{
  * @param id query params to find the user to update
  * @param attributes A partial user object
  */ const updateById$1 = async (id, attributes)=>{
+    const currentUser = await getService$1('auth').getCurrentUser();
+    const userToUpdate = await findOne$2(id);
+
+    // Only super admins can edit other admin users
+    if (id !== currentUser.id && !hasSuperAdminRole$1(currentUser)) {
+        throw new ValidationError$6('Only super admins can edit other users.');
+    }
+
     // Check at least one super admin remains
     if (_.has(attributes, 'roles')) {
         const lastAdminUser = await isLastSuperAdminUser$1(id);
@@ -7639,6 +7647,14 @@ const removeFromEEDisabledUsersList = async (ids)=>{
  * @param attributes A partial user object
  * @returns {Promise<user>}
  */ const updateById = async (id, attributes)=>{
+    const currentUser = await getService('auth').getCurrentUser();
+    const userToUpdate = await findOne(id);
+
+    // Only super admins can edit other admin users
+    if (id !== currentUser.id && !hasSuperAdminRole(currentUser)) {
+        throw new ValidationError$1('Only super admins can edit other users.');
+    }
+
     // Check at least one super admin remains
     if (_.has(attributes, 'roles')) {
         const lastAdminUser = await isLastSuperAdminUser(id);
```
