mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
feat(registries): Registry browser for non-admins [EE-2459] (#6549)
* feat(registries): allow non-admin users to see environment registries * remove unused function * fix error message * fix test * fix imports order * feat(registry): check access first, add parameters name * use registryID * fix(sidebar): allow standard users to see endpoint registries view Co-authored-by: LP B <xAt0mZ@users.noreply.github.com>
This commit is contained in:
parent
77e48bfb74
commit
f9f937f844
15 changed files with 226 additions and 202 deletions
|
@ -2,12 +2,13 @@ import KubernetesNamespaceHelper from 'Kubernetes/helpers/namespaceHelper';
|
|||
|
||||
export default class KubernetesRegistryAccessController {
|
||||
/* @ngInject */
|
||||
constructor($async, $state, ModalService, EndpointService, Notifications, KubernetesResourcePoolService) {
|
||||
constructor($async, $state, ModalService, EndpointService, Notifications, RegistryService, KubernetesResourcePoolService) {
|
||||
this.$async = $async;
|
||||
this.$state = $state;
|
||||
this.ModalService = ModalService;
|
||||
this.Notifications = Notifications;
|
||||
this.KubernetesResourcePoolService = KubernetesResourcePoolService;
|
||||
this.RegistryService = RegistryService;
|
||||
this.EndpointService = EndpointService;
|
||||
|
||||
this.state = {
|
||||
|
@ -57,7 +58,7 @@ export default class KubernetesRegistryAccessController {
|
|||
this.state = {
|
||||
registryId: this.$state.params.id,
|
||||
};
|
||||
this.registry = await this.EndpointService.registry(this.endpoint.Id, this.state.registryId);
|
||||
this.registry = await this.RegistryService.registry(this.state.registryId, this.endpoint.Id);
|
||||
if (this.registry.RegistryAccesses && this.registry.RegistryAccesses[this.endpoint.Id]) {
|
||||
this.savedResourcePools = this.registry.RegistryAccesses[this.endpoint.Id].Namespaces.map((value) => ({ value }));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue