mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
fix(app/registries): enforce user accesses on registries (#12088)
Some checks failed
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled
Some checks failed
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled
This commit is contained in:
parent
25f84c0b3e
commit
68011fb293
16 changed files with 308 additions and 92 deletions
|
@ -20,6 +20,7 @@ angular
|
|||
.module('portainer.app', [
|
||||
'portainer.oauth',
|
||||
'portainer.rbac',
|
||||
'portainer.registrymanagement',
|
||||
componentsModule,
|
||||
settingsModule,
|
||||
featureFlagModule,
|
||||
|
@ -352,47 +353,6 @@ angular
|
|||
},
|
||||
};
|
||||
|
||||
var registries = {
|
||||
name: 'portainer.registries',
|
||||
url: '/registries',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: './views/registries/registries.html',
|
||||
controller: 'RegistriesController',
|
||||
},
|
||||
},
|
||||
data: {
|
||||
docs: '/admin/registries',
|
||||
access: AccessHeaders.Admin,
|
||||
},
|
||||
};
|
||||
|
||||
var registry = {
|
||||
name: 'portainer.registries.registry',
|
||||
url: '/:id',
|
||||
views: {
|
||||
'content@': {
|
||||
component: 'editRegistry',
|
||||
},
|
||||
},
|
||||
data: {
|
||||
docs: '/admin/registries/edit',
|
||||
},
|
||||
};
|
||||
|
||||
const registryCreation = {
|
||||
name: 'portainer.registries.new',
|
||||
url: '/new',
|
||||
views: {
|
||||
'content@': {
|
||||
component: 'createRegistry',
|
||||
},
|
||||
},
|
||||
data: {
|
||||
docs: '/admin/registries/add',
|
||||
},
|
||||
};
|
||||
|
||||
var settings = {
|
||||
name: 'portainer.settings',
|
||||
url: '/settings',
|
||||
|
@ -497,9 +457,6 @@ angular
|
|||
$stateRegistryProvider.register(home);
|
||||
$stateRegistryProvider.register(init);
|
||||
$stateRegistryProvider.register(initAdmin);
|
||||
$stateRegistryProvider.register(registries);
|
||||
$stateRegistryProvider.register(registry);
|
||||
$stateRegistryProvider.register(registryCreation);
|
||||
$stateRegistryProvider.register(settings);
|
||||
$stateRegistryProvider.register(settingsAuthentication);
|
||||
$stateRegistryProvider.register(settingsEdgeCompute);
|
||||
|
|
51
app/portainer/registry-management/index.js
Normal file
51
app/portainer/registry-management/index.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
import { AccessHeaders } from '../authorization-guard';
|
||||
|
||||
angular.module('portainer.registrymanagement', []).config(config);
|
||||
|
||||
/* @ngInject */
|
||||
function config($stateRegistryProvider) {
|
||||
const registries = {
|
||||
name: 'portainer.registries',
|
||||
url: '/registries',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: './views/list/registries.html',
|
||||
controller: 'RegistriesController',
|
||||
},
|
||||
},
|
||||
data: {
|
||||
docs: '/admin/registries',
|
||||
access: AccessHeaders.Admin,
|
||||
},
|
||||
};
|
||||
|
||||
const registryCreation = {
|
||||
name: 'portainer.registries.new',
|
||||
url: '/new',
|
||||
views: {
|
||||
'content@': {
|
||||
component: 'createRegistry',
|
||||
},
|
||||
},
|
||||
data: {
|
||||
docs: '/admin/registries/add',
|
||||
},
|
||||
};
|
||||
|
||||
const registry = {
|
||||
name: 'portainer.registries.registry',
|
||||
url: '/:id',
|
||||
views: {
|
||||
'content@': {
|
||||
component: 'editRegistry',
|
||||
},
|
||||
},
|
||||
data: {
|
||||
docs: '/admin/registries/edit',
|
||||
},
|
||||
};
|
||||
|
||||
$stateRegistryProvider.register(registries);
|
||||
$stateRegistryProvider.register(registry);
|
||||
$stateRegistryProvider.register(registryCreation);
|
||||
}
|
|
@ -12,6 +12,7 @@ import { columnHelper } from './helper';
|
|||
export const name = columnHelper.accessor('Name', {
|
||||
header: 'Name',
|
||||
cell: NameCell,
|
||||
id: 'name',
|
||||
});
|
||||
|
||||
function NameCell({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue