-
Notifications
You must be signed in to change notification settings - Fork 946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[backend] add 'unauthorized' in event scope filter values (#8414) #8417
Conversation
08687d6
to
4bc16c2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8417 +/- ##
==========================================
+ Coverage 66.13% 66.19% +0.06%
==========================================
Files 597 597
Lines 60382 60387 +5
Branches 6192 6193 +1
==========================================
+ Hits 39935 39975 +40
+ Misses 20447 20412 -35 ☔ View full report in Codecov by Sentry. |
@@ -31,7 +31,7 @@ const HistoryDefinition: AttributeDefinition[] = [ | |||
{ name: 'event_type', label: 'Event type', type: 'string', format: 'enum', values: ['authentication', 'read', 'mutation', 'file', 'command'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: true }, | |||
{ name: 'event_status', label: 'Event status', type: 'string', format: 'enum', values: ['error', 'success'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: false }, | |||
{ name: 'event_access', label: 'Event access', type: 'string', format: 'enum', values: ['extended', 'administration'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: false }, | |||
{ name: 'event_scope', label: 'Event scope', type: 'string', format: 'enum', values: ['create', 'update', 'delete', 'read', 'search', 'enrich', 'download', 'import', 'export', 'login', 'logout'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: true }, | |||
{ name: 'event_scope', label: 'Event scope', type: 'string', format: 'enum', values: ['create', 'update', 'delete', 'read', 'search', 'enrich', 'download', 'import', 'export', 'login', 'logout', 'unauthorized'], editDefault: false, mandatoryType: 'internal', multiple: false, upsert: false, isFilterable: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't know we had to list the values like this in the attribute definition for static enums. I guess it will fix this specific issue, but I wonder if we shouldn't think of another approach to make sure we maintain correctly this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least put it in a constant EVENT_SCOPE_VALUES = [..] ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if so, it means we put every enum filters in constants.... (event access, event type, event status, maximum retention unit, file scope etc)
f8f901e
to
a9e61e0
Compare
Proposed changes
Add the 'unauthorized' value in event scope files (in Settings > Activity)
Related issues
#8414