Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Non Adminstrator Users able to change their own role to Administrator #2511

Open
officialgithub opened this issue Jun 16, 2022 · 1 comment

Comments

@officialgithub
Copy link

Describe the Bug

After login with non-admin-role user, I request patch to /users/:id?access_token={jwt} with { role:1, first_name:'Ronda'}
and the result is user's role changed to admin-role. Even if in permission of directus_users, this field is not writable.
image

To Reproduce

Create Reguler User Role (ex. Content Writer) with no app and admin access.
Login with axios, use jwt and send patch to /users/:id?access_token={jwt} with value {role:1}

Errors Shown

No response

What version of Directus are you using?

8.8.1

What version of Node.js are you using?

What database are you using?

MySql

What browser are you using?

Chrome

How are you deploying Directus?

DigitalOcean Image

@rijkvanzanten rijkvanzanten transferred this issue from directus/directus Jun 16, 2022
@rijkvanzanten
Copy link
Member

v8 has been deprecated and has been end-of-life for over 2 years. Please don't rely on it in production. Use the latest version instead.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants