spinspire / pocketbase-sveltekit-starter

a starter project to build a SvelteKit frontend with PocketBase backend
MIT License
342 stars 59 forks source link

When you're not the author you could avoid having Edit and Delete links #19

Closed j2l closed 1 year ago

j2l commented 1 year ago

When you're not the author of a post you can't edit and delete and you get a (too) broad error message: The requested resource wasn't found

If you test for each record using $currentUser.id == post.user, you can remove edit and delete links :) Hope it helps others understand about the SK logic.

I'm learning about Pocketbase, maybe there's a clever way.

j2l commented 1 year ago

image

jkdoshi commented 1 year ago

Thank you for the PR. Merged!

j2l commented 1 year ago

You're welcome, thank YOU @jkdoshi for this project. Could you let me know about the licence? See https://github.com/spinspire/pocketbase-sveltekit-starter/issues/18 Have a great Friday and a wonderful week-end!