Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App shows non-editable fields as editable in update #16834

Closed
Pachat opened this issue Dec 15, 2022 · 2 comments
Closed

App shows non-editable fields as editable in update #16834

Pachat opened this issue Dec 15, 2022 · 2 comments

Comments

@Pachat
Copy link

Pachat commented Dec 15, 2022

Describe the Bug

On a collection with an input field, with a permission to update for the user_created only, others can still edit the field.
They get an error on saving.

To Reproduce

  1. A collection with (id, user_created, input_field)
  2. The regular role has all access on the collection, except for Update where permission item is
{
	"_and": [
		{
			"user_created": {
				"_eq": "$CURRENT_USER"
			}
		}
	]
}

  1. Create an item

  2. Connect with an another user account

Errors Shown

  • You can still edit the input of the item creator (that you are not)
  • On saving, you get
{
  "message": "You don't have permission to access this.",
  "extensions": {
    "code": "FORBIDDEN"
  }
}

=> Better not allow any editing of the fields that you are not allowed to edit.

What version of Directus are you using?

9.21.0

What version of Node.js are you using?

19.0.1

What database are you using?

Postgresql 15

What browser are you using?

Firefox & Edge

How are you deploying Directus?

VPS

@Pachat
Copy link
Author

Pachat commented Mar 8, 2023

I hope this will have a resolution in the next version.
Because right now the end user who is redirected to admin/content/:collection/ec1c0f9f-ab71-4bc0-939e-b16620435084 will see all editable fields but when not allowed to edit , will receive an error message only when saving .
Better to allow him to see the fields but not to modify them.

@rijkvanzanten rijkvanzanten changed the title Update permission filter not correctly applied App shows non-editable fields as editable in update Mar 27, 2024
@hanneskuettner
Copy link
Contributor

I'm unable to reproduce this in v10.10.7 and will close this issue. Feel free to comment on this issue if the error happens to persist in the current version!

@hanneskuettner hanneskuettner closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants