[Bug]: Creating new user incorrectly generates warning for tag access control #2223

Closed
opened 2026-04-25 00:05:07 +02:00 by adam · 2 comments
Owner

Originally created by @nichwall on GitHub (Sep 2, 2024).

What happened?

Created a new user with or without access control by tags. A warning is incorrectly logged, but access control is correctly applied.

Investigating in the code, looks like this is specifically due to line 162 because the selectedTagNotAccessible is an array and handled before the loop over the request keys. Note that this only applies for tags, access control by libraries does not generate this warning.
https://github.com/advplyr/audiobookshelf/blob/48f232790a5026ac886564ef57660a338a168187/server/controllers/UserController.js#L141-L168

What did you expect to happen?

No warning for creating/updating a user with tag access control.

Steps to reproduce the issue

  1. Create new user and disable "User can access all tags"

Audiobookshelf version

v2.13.2

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Other (list in "Additional Notes" box)

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

[UserController] create: Invalid permission key: selectedTagsNotAccessible

Additional Notes

Synology NAS

Originally created by @nichwall on GitHub (Sep 2, 2024). ### What happened? Created a new user with or without access control by tags. A warning is incorrectly logged, but access control is correctly applied. Investigating in the code, looks like this is specifically due to line 162 because the `selectedTagNotAccessible` is an array and handled before the loop over the request keys. Note that this only applies for tags, access control by libraries does not generate this warning. https://github.com/advplyr/audiobookshelf/blob/48f232790a5026ac886564ef57660a338a168187/server/controllers/UserController.js#L141-L168 ### What did you expect to happen? No warning for creating/updating a user with tag access control. ### Steps to reproduce the issue 1. Create new user and disable "User can access all tags" ### Audiobookshelf version v2.13.2 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Other (list in "Additional Notes" box) ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell [UserController] create: Invalid permission key: selectedTagsNotAccessible ``` ### Additional Notes Synology NAS
adam added the bug label 2026-04-25 00:05:07 +02:00
adam closed this issue 2026-04-25 00:05:08 +02:00
Author
Owner

@nichwall commented on GitHub (Sep 2, 2024):

Update, the "tag invert" is not stored correctly. Related to https://github.com/advplyr/audiobookshelf/issues/3365

@nichwall commented on GitHub (Sep 2, 2024): Update, the "tag invert" is not stored correctly. Related to https://github.com/advplyr/audiobookshelf/issues/3365
Author
Owner

@nichwall commented on GitHub (Sep 2, 2024):

Well, I went on a wild goose chase because I misunderstood the error.
Duplicate of #3365

@nichwall commented on GitHub (Sep 2, 2024): Well, I went on a wild goose chase because I misunderstood the error. Duplicate of #3365
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2223