backstage
61 строка · 1.5 Кб
1/*
2* Copyright 2022 The Backstage Authors
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*/
16
17import { createPermission } from '@backstage/plugin-permission-common';
18
19/**
20* @public
21*/
22export const devToolsAdministerPermission = createPermission({
23name: 'devtools.administer',
24attributes: { action: 'read' },
25});
26
27/**
28* @public
29*/
30export const devToolsInfoReadPermission = createPermission({
31name: 'devtools.info',
32attributes: { action: 'read' },
33});
34
35/**
36* @public
37*/
38export const devToolsConfigReadPermission = createPermission({
39name: 'devtools.config',
40attributes: { action: 'read' },
41});
42
43/**
44* @public
45*/
46export const devToolsExternalDependenciesReadPermission = createPermission({
47name: 'devtools.external-dependencies',
48attributes: { action: 'read' },
49});
50
51/**
52* List of all Devtools permissions
53*
54* @public
55*/
56export const devToolsPermissions = [
57devToolsAdministerPermission,
58devToolsInfoReadPermission,
59devToolsConfigReadPermission,
60devToolsExternalDependenciesReadPermission,
61];
62