Restrict users to editing their own page

I understand users can be restricted to certain activities and there have been attempts for finer restrictions before. Some time has past since that last thread–is there now a way to restrict a user to a certain page? Specifically one that they created?

Use case: a group of a hundred artists or so want to be able to create their own unique profile pages and edit them later, without being able to edit other artist pages.

If this is possible, would it be better implemented in the front-end or the panel?

EDIT: After reading this post on editing a field from the front end… I realized I could make a “my profile” page which looks for a related page in the backend (userid or email based) then pre-fills a form with this data if it exists. If not, the form would allow someone to edit their profile for the first time.

Are you planning to create these authors as Kirby users? Or as pages?

With Kirby users, it would be really easy to prevent them doing anything but editing their own profiles in the Panel.

Kirby users would be fine. I think there about 150 artists at this time. We wanted to show some images, a few paragraphs, and some other fields for each artist profile. I assumed this would have to be a page, but are you suggesting it could it be stored as user data?

Are there any privacy concerns here? My understanding is that they can view other user profiles as read only, but not edit. Is it possible to lock them out of seeing anything but their own profile?

Yes.

Wohoo!

Yes, user account pages can hold basically the same information as normal pages. You can then create virtual pages from these user profiles in the frontend.

1 Like

Is there a way to create a virtual page from a url like /artist-members/luke-hatfield that then finds the user based on their name instead of id? I don’t want the url to have to show the id, like /artist-members/3sjllbhl, just to get the artist associated with this id and serve a virtual page.

The name is not a required user attribute and it may no be unique. So yes, you should be able to find a user by name, but this will fail if the user doesn’t have a name.

1 Like

Thank you pixelijn! Now I’m looping through all users in my config until the name matches the path slug, then rendering the data from that user account. All good unless the name doesn’t exist.