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
Meshery UI permissions addition/fix #10728
Conversation
68dee0a
to
fe09698
Compare
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.
Other LGTM
ui/components/ConfirmationModal.js
Outdated
disabled={ | ||
!CAN(keys.UNDEPLOY_DESIGN.action, keys.UNDEPLOY_DESIGN.subject) || | ||
(CAN(keys.UNDEPLOY_DESIGN.action, keys.UNDEPLOY_DESIGN.subject) && !disabled) | ||
} |
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.
We can simplify this, any reason we should stick with the change you made?
disabled={ | |
!CAN(keys.UNDEPLOY_DESIGN.action, keys.UNDEPLOY_DESIGN.subject) || | |
(CAN(keys.UNDEPLOY_DESIGN.action, keys.UNDEPLOY_DESIGN.subject) && !disabled) | |
} | |
disabled={!CAN(keys.UNDEPLOY_DESIGN.action, keys.UNDEPLOY_DESIGN.subject) || !disabled} |
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.
@Yashsharma1911 I wrote it that way because we need to first check if the person has the permission to do that action or not, and then check if the disabled property (which is dependent on the length of the k8s context.) is true or false.
Your suggestion has the chance to enable the action even if the person doesn't have permission for that action.
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.
Though I just realised the '!' mark before diabled isn't needed and have updated the PR for the same.
ui/components/ConfirmationModal.js
Outdated
disabled={ | ||
!CAN(keys.DEPLOY_DESIGN.action, keys.DEPLOY_DESIGN.subject) || | ||
(CAN(keys.DEPLOY_DESIGN.action, keys.DEPLOY_DESIGN.subject) && !disabled) | ||
} |
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.
same here
pointerEvents: !CAN(keys.VIEW_CONNECTIONS.action, keys.VIEW_CONNECTIONS.subject) | ||
? 'none' | ||
: 'auto', |
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.
Thankyou for this
145351e
to
a182771
Compare
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
a182771
to
4697cfc
Compare
Signed-off-by: Rudraksh Tyagi <rudraksh875@gmail.com>
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, please keep your eye after merging this to make sure we don't introduce any error or issue
Ohh ho, I missed the pr do not merge label, should we revert this PR? is this contain any breaking change? |
Notes for Reviewers
This PR adds missing permissions for various actions in -
This also fixes -
Signed commits