-
Notifications
You must be signed in to change notification settings - Fork 415
RI-6848: add info_command_is_disabled to analytics when INFO is disabled via ACL #4390
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
RI-6848: add info_command_is_disabled to analytics when INFO is disabled via ACL #4390
Conversation
redisinsight/api/src/modules/database/database-connection.service.ts
Outdated
Show resolved
Hide resolved
| clientMetadata.databaseId, | ||
| { | ||
| databaseId: clientMetadata.databaseId, | ||
| ...(infoCommandIsDisabled ? { info_command_is_disabled: 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.
if we will add isInfoCommandDisabled flag into RedisClient we can then avoid adding custom logic here and slightly simplify this. It become { isInfoComaandDisabled: client.isInfoCommandDisabled } or something similar
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.
updated, however I pass no key/value in case of false
| if (error.message.includes(ERROR_MESSAGES.NO_INFO_COMMAND_PERMISSION)) { | ||
| try { | ||
| // Fallback to getting basic information from `hello` command | ||
| this.isInfoCommandDisabled = 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.
Seems like you forgot to add this.isInfoCommandDisabled = true; into try black when info command wasn't fail.
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.
this.isInfoCommandDisabled = false I mean
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.
updated default value and made it boolean; currently there's no need of a 3rd value
ArtemHoruzhenko
left a comment
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.
lgtm
cc96937
into
feature/RI-6658/no-perm-info-command
* RI-6849: fallback to hello command when connecting to db * RI-6849: refactor and test convertArrayOfKeyValuePairsToObject * RI-6849: expose getRedisInfo method * RI-6849: refactor getInfo method, expose from client * remove convertArrayOfKeyValuePairsToObject * fix failing unit test * update test * add default redis info * update static value * update default info * update default info * refactor getInfo * fix failing test * RI-6844: hide db overview metrics when data is not available (#4383) * RI-6848: add info_command_is_disabled to analytics when INFO is disabled via ACL (#4390) * RI-6848: add info_command_is_disabled to analytics when INFO is disabled via ACL * add isInfoCommandDisabled prop to RedisClient * preserve function signature * set default value for isInfoCommandDisabled * refactor getInfo * update: always call HELLO if INFO fails
No description provided.