[PR #3368] [MERGED] Fix tag permissions #3952

Closed
opened 2026-04-25 00:17:42 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3368
Author: @nichwall
Created: 9/2/2024
Status: Merged
Merged: 9/2/2024
Merged by: @advplyr

Base: masterHead: fix_tag_permissions


📝 Commits (3)

  • 9cca731 Add: missing default user permission property
  • 790c1fb Allow update of default permission keys missing for user
  • 47712e6 Update user default permissions

📊 Changes

2 files changed (+4 additions, -1 deletions)

View changed files

📝 server/controllers/UserController.js (+3 -1)
📝 server/models/User.js (+1 -0)

📄 Description

Fixes https://github.com/advplyr/audiobookshelf/issues/3365

This PR updates the default User model to include selectedTagsNotAccessible on the default user creation. The patch request for /api/users/{id} is also updated to compare the payload against the default permissions to allow for values to be updated by clients on existing users which do not have the key in the permissions array. I'm not sure if that's the best way to do this, but figured it was more secure to validate against the default properties instead of allowing arbitrary keys to be created by a client.

This does not go through and update existing users which do not have selectedTagsNotAccessible.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3368 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 9/2/2024 **Status:** ✅ Merged **Merged:** 9/2/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix_tag_permissions` --- ### 📝 Commits (3) - [`9cca731`](https://github.com/advplyr/audiobookshelf/commit/9cca731acc004fda1a54093affb52effe3a249ee) Add: missing default user permission property - [`790c1fb`](https://github.com/advplyr/audiobookshelf/commit/790c1fb34a6a8cba2d9be3084a3d05db6504a53d) Allow update of default permission keys missing for user - [`47712e6`](https://github.com/advplyr/audiobookshelf/commit/47712e63f1c52bd4c8d3940b9afb2eadb2bbddf4) Update user default permissions ### 📊 Changes **2 files changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/controllers/UserController.js` (+3 -1) 📝 `server/models/User.js` (+1 -0) </details> ### 📄 Description Fixes https://github.com/advplyr/audiobookshelf/issues/3365 This PR updates the default User model to include `selectedTagsNotAccessible` on the default user creation. The `patch` request for `/api/users/{id}` is also updated to compare the payload against the default permissions to allow for values to be updated by clients on existing users which do not have the key in the `permissions` array. I'm not sure if that's the best way to do this, but figured it was more secure to validate against the default properties instead of allowing arbitrary keys to be created by a client. This does not go through and update existing users which do not have `selectedTagsNotAccessible`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:17:42 +02:00
adam closed this issue 2026-04-25 00:17:42 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3952