1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

fix(registry): non admin can see add registry button [BE-10834] (#12112)

This commit is contained in:
Oscar Zhou 2024-08-21 11:00:00 +12:00 committed by GitHub
parent a39abe61c2
commit 8cd53a4b7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,12 +1,16 @@
import { Authorized } from '@/react/hooks/useUser';
import { AddButton as BaseAddButton } from '@@/buttons'; import { AddButton as BaseAddButton } from '@@/buttons';
export function AddButton() { export function AddButton() {
return ( return (
<Authorized authorizations="OperationPortainerRegistryCreate">
<BaseAddButton <BaseAddButton
data-cy="registry-addRegistryButton" data-cy="registry-addRegistryButton"
to="portainer.registries.new" to="portainer.registries.new"
> >
Add registry Add registry
</BaseAddButton> </BaseAddButton>
</Authorized>
); );
} }