-
-
Notifications
You must be signed in to change notification settings - Fork 599
Open
Description
Description
There is a typo in server/lib/watchlistsync.ts at line 47. The permission check uses Permission.AUTO_APPROVE_TV instead of Permission.AUTO_REQUEST_TV:
// Current (buggy) - line 47
if (
!user.hasPermission(
[
Permission.AUTO_REQUEST,
Permission.AUTO_REQUEST_MOVIE,
Permission.AUTO_APPROVE_TV, // <-- Should be AUTO_REQUEST_TV
],
{ type: 'or' }
)
) {
return;
}Impact
This bug affects:
- Users with only
AUTO_REQUEST_TVpermission - They are incorrectly skipped during watchlist sync because their TV permission isn't recognized - Future edge cases where permission bitwise checks behave unexpectedly due to checking the wrong permission type (implemented in feat: Allow admin/owner to opt out of auto-approval #4308)
Root Cause
Simple typo: AUTO_APPROVE_TV vs AUTO_REQUEST_TV
Fix
Change line 47 from:
Permission.AUTO_APPROVE_TVto:
Permission.AUTO_REQUEST_TVRelated Issues
This may be the root cause of #4202 (Watchlist auto-request not populating)
Version
develop branch (current)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels