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

Creating Own content #16022

Open
DJ-Paxton opened this issue May 10, 2024 · 3 comments
Open

Creating Own content #16022

DJ-Paxton opened this issue May 10, 2024 · 3 comments
Labels
Milestone

Comments

@DJ-Paxton
Copy link

Hi all, I'm trying to do a collaborative website where multiple people can create and update content.
In a previous project I created roles for specific ContentTypes and that worked fine, but because of the nature of this actual project I need multiple users to work with the same types and I found my workaround with Ownership.

So, what I'm doing at the moment is using my Admin account to change the owner of the content item with the owner editor,

Screenshot 2024-05-10 115523
Screenshot 2024-05-10 115610

and I created a role that only allows to Edit Own content.

Screenshot 2024-05-10 115724

Screenshot 2024-05-10 113734

The issue is I want that user to be able to create content,
The Owner Role has the Edit and Publish or unpublish Own content permission enabled but it doesn't allow to create content (in green), then I can enable Edit or Publish for others (in red) and the user will be able to create content, but also modify content that's not owned by him.

Screenshot 2024-05-10 114145

When I save the for others permissions:

Screenshot 2024-05-10 114826

The user can create content (green) which is good, but also modify content that doesn't belong to him (red) which is bad.

Is there any option that I'm missing or some permission I'm doing wrong?
Thanks for the help!

@hishamco
Copy link
Member

Try to logout then login after you apply the permissions changes

@sebastienros
Copy link
Member

I believe "Edit and Publish or unpublish Own content" should be sufficient to create a new content item.

What I think is happening is that we always check for the common permission (not "own") and then a handler will grant it if the corresponding "own" permission is set and the content item is owned by the current user. However here there is no content item yet, so we can't rely on the handler, hence the Creation checks should check for either role without a content item.

But we also need to check if the issue is not only in the UI (not rendering the button because of that) and the actual controller is accepting this call just fine.

@sebastienros sebastienros added this to the 2.x milestone May 16, 2024
@gvkries
Copy link
Contributor

gvkries commented May 22, 2024

Works for me with the main branch... 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants