-
-
Notifications
You must be signed in to change notification settings - Fork 1
Some string permission conditions behave unexpectedly when the value is null #64
Copy link
Copy link
Open
Labels
Complexity: EXTREMEThis issue involves resolving complex features and/or understanding the project trajectoryThis issue involves resolving complex features and/or understanding the project trajectoryModule: APIThis issue pertains to the apps/api moduleThis issue pertains to the apps/api modulePriority: LOWThis issue isn't critical, security-related, or significantly beneficial to users.This issue isn't critical, security-related, or significantly beneficial to users.Type: BugSomething isn't workingSomething isn't working
Description
Activity
Metadata
Metadata
Assignees
Labels
Complexity: EXTREMEThis issue involves resolving complex features and/or understanding the project trajectoryThis issue involves resolving complex features and/or understanding the project trajectoryModule: APIThis issue pertains to the apps/api moduleThis issue pertains to the apps/api modulePriority: LOWThis issue isn't critical, security-related, or significantly beneficial to users.This issue isn't critical, security-related, or significantly beneficial to users.Type: BugSomething isn't workingSomething isn't working
By default, the Guest group currently has permission to read Productions that match the following condition:
{ "NOT": { "teamNotes": { "startsWith": "private" } } }This allows us to add the word "private" to the start of team notes in order to make it visible only to members. However, if the
teamNotesfield isnull, the rule check will fail, preventing them from seeing the production, despite the fact that itsteamNotesfielld obviously does not start with "private". This may or may not have something to do with the fact that it's an inverted condition (i.e., theNOT).A temporary workaround for situations like this is to add an explicit condition for when the value is null:
{ "OR": [ { "teamNotes": null }, { "NOT": { "teamNotes": { "startsWith": "private" } } } ] }