Azure DevOps permissions added

Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>
This commit is contained in:
Deepankumar Loganathan
2024-01-29 07:22:38 +01:00
parent 6e0a8e5227
commit dc99b56bc8
3 changed files with 55 additions and 0 deletions
+1
View File
@@ -16,3 +16,4 @@
export * from './types';
export * from './constants';
export * from './permissions';
@@ -0,0 +1,53 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createPermission } from '@backstage/plugin-permission-common';
import { RESOURCE_TYPE_CATALOG_ENTITY } from '@backstage/plugin-catalog-common';
export const azureDevOpsPullRequestReadPermission = createPermission({
name: 'azure.devops.pullrequest.read',
attributes: { action: 'read' },
resourceType: RESOURCE_TYPE_CATALOG_ENTITY,
});
export const azureDevOpsPullRequestDashboardReadPermission = createPermission({
name: 'azure.devops.pullrequest.dashboard.read',
attributes: { action: 'read' },
});
export const azureDevOpsPipelineReadPermission = createPermission({
name: 'azure.devops.pipeline.read',
attributes: { action: 'read' },
resourceType: RESOURCE_TYPE_CATALOG_ENTITY,
});
export const azureDevOpsGitTagReadPermission = createPermission({
name: 'azure.devops.gittag.read',
attributes: { action: 'read' },
resourceType: RESOURCE_TYPE_CATALOG_ENTITY,
});
export const azureDevOpsReadmeReadPermission = createPermission({
name: 'azure.devops.readme.read',
attributes: { action: 'read' },
resourceType: RESOURCE_TYPE_CATALOG_ENTITY,
});
export const azureDevOpsPermissions = [
azureDevOpsPullRequestReadPermission,
azureDevOpsPipelineReadPermission,
azureDevOpsGitTagReadPermission,
azureDevOpsReadmeReadPermission,
azureDevOpsPullRequestDashboardReadPermission,
];
+1
View File
@@ -210,6 +210,7 @@ export interface Team {
export interface ReadmeConfig {
project: string;
repo: string;
entityRef: string;
host?: string;
org?: string;
path?: string;