stash-box icon indicating copy to clipboard operation
stash-box copied to clipboard

Allow "Read" Role to Edit Favorite Notifications

Open sashapp opened this issue 3 months ago • 5 comments

As mentioned in issue #927, normal users cannot set notifications for their favorite studios and performers. This PR remedies the issue by adding a second API call updateFavoriteNotificationSubscriptions requiring only the READ role. In the backend, a check is performed, such that indeed only the favorite notifications can be edited (other notifications are filtered out and cannot be set via the call).

sashapp avatar Sep 16 '25 07:09 sashapp

They are not "admin" notifications. They require EDIT role to use. Using admin terminology makes no sense.

DogmaDragon avatar Sep 16 '25 17:09 DogmaDragon

You are right. I changed it from admin to editor. Do you like this better or do you have another proposal?

sashapp avatar Sep 17 '25 06:09 sashapp

I fixed the failing pipeline.

sashapp avatar Sep 25 '25 09:09 sashapp

@DogmaDragon Do you agree with the renaming from admin to editor subscriptions?

sashapp avatar Oct 01 '25 05:10 sashapp

That sounds better to me, but @InfiniteStash has the final say.

DogmaDragon avatar Oct 01 '25 11:10 DogmaDragon

@InfiniteStash what are your thoughts on this PR?

sashapp avatar Nov 12 '25 07:11 sashapp

@InfiniteStash what are your thoughts on this PR?

Hey, thanks for the PR.

I would prefer just using the existing mutation and changing it to READ permission. Having multiple mutations for the same thing is more work to maintain. We can change the mutation to filter the notifications on the backend and only persist favorites notifications for anyone without edit perms, and similarly only show favorite notifications on the frontend for anyone missing edit.

InfiniteStash avatar Nov 16 '25 09:11 InfiniteStash

Perfect, will do :)

sashapp avatar Nov 18 '25 10:11 sashapp

@InfiniteStash @DogmaDragon I have created a second proposal in Allow "Read" Role to Edit Favorite Notifications.

sashapp avatar Nov 18 '25 10:11 sashapp