mirror of
https://github.com/portainer/portainer.git
synced 2025-08-10 16:25:22 +02:00
fix(sidebar/authorized): authorized component fallback on id param if endpointId doesnt exist in router params
This commit is contained in:
parent
82fb5f7ac1
commit
7e524e0343
1 changed files with 2 additions and 2 deletions
|
@ -51,14 +51,14 @@ export function useAuthorizations(
|
|||
) {
|
||||
const { user } = useUser();
|
||||
const {
|
||||
params: { endpointId },
|
||||
params: { endpointId, id },
|
||||
} = useCurrentStateAndParams();
|
||||
|
||||
if (!user) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return hasAuthorizations(user, authorizations, endpointId, adminOnlyCE);
|
||||
return hasAuthorizations(user, authorizations, endpointId ?? id, adminOnlyCE);
|
||||
}
|
||||
|
||||
export function isEnvironmentAdmin(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue