mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
fix: cr permission actions (#2574)
Fixes an issue where `PermissionSwitch` would not update because we passed in environmentId and the UPDATE_PROJECT permission is only project specific. Also fixes an issue where hasAccess didn't take in projectId for UPDATE_PROJECT which is a project specific permission.
This commit is contained in:
parent
5c74efc6c6
commit
4bc2c747b1
@ -161,7 +161,12 @@ export const ChangeRequestConfiguration: VFC = () => {
|
||||
approvals
|
||||
);
|
||||
}}
|
||||
disabled={!hasAccess(UPDATE_PROJECT)}
|
||||
disabled={
|
||||
!hasAccess(
|
||||
UPDATE_PROJECT,
|
||||
projectId
|
||||
)
|
||||
}
|
||||
IconComponent={
|
||||
KeyboardArrowDownOutlined
|
||||
}
|
||||
@ -186,7 +191,6 @@ export const ChangeRequestConfiguration: VFC = () => {
|
||||
<StyledBox data-loading>
|
||||
<PermissionSwitch
|
||||
checked={value}
|
||||
environmentId={original.environment}
|
||||
projectId={projectId}
|
||||
permission={UPDATE_PROJECT}
|
||||
inputProps={{ 'aria-label': original.environment }}
|
||||
|
Loading…
Reference in New Issue
Block a user