mirror of https://github.com/portainer/portainer
fix(authorization): add registry button disappear for admin [BE-11228] (#12213)
parent
5fd4f52e35
commit
5740abe31b
|
@ -112,7 +112,7 @@ export function useAuthorizations(
|
||||||
return { authorized: false, isLoading: false };
|
return { authorized: false, isLoading: false };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (envQuery.isLoading || isAdminQuery.isLoading) {
|
if (envQuery.isInitialLoading || isAdminQuery.isLoading) {
|
||||||
return { authorized: false, isLoading: true };
|
return { authorized: false, isLoading: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { AddButton as BaseAddButton } from '@@/buttons';
|
||||||
|
|
||||||
export function AddButton() {
|
export function AddButton() {
|
||||||
return (
|
return (
|
||||||
<Authorized authorizations="OperationPortainerRegistryCreate">
|
<Authorized authorizations="OperationPortainerRegistryCreate" adminOnlyCE>
|
||||||
<BaseAddButton
|
<BaseAddButton
|
||||||
data-cy="registry-addRegistryButton"
|
data-cy="registry-addRegistryButton"
|
||||||
to="portainer.registries.new"
|
to="portainer.registries.new"
|
||||||
|
|
Loading…
Reference in New Issue