
This commit applies the Black format to the `dcorch/api` files to ensure that it adheres to the Black code style guidelines. Test Plan: PASS: Success in stx-distcloud-tox-black Story: 2011149 Task: 50445 Change-Id: I9e5bd8ca9dd33a7cdd2ce36e8dcbd4be65c436d7 Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
29 lines
684 B
Python
29 lines
684 B
Python
#
|
|
# Copyright (c) 2022, 2024 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
from oslo_policy import policy
|
|
|
|
ADMIN_IN_SYSTEM_PROJECTS = "admin_in_system_projects"
|
|
READER_IN_SYSTEM_PROJECTS = "reader_in_system_projects"
|
|
|
|
|
|
base_rules = [
|
|
policy.RuleDefault(
|
|
name=ADMIN_IN_SYSTEM_PROJECTS,
|
|
check_str="role:admin and (project_name:admin or " + "project_name:services)",
|
|
description="Base rule.",
|
|
),
|
|
policy.RuleDefault(
|
|
name=READER_IN_SYSTEM_PROJECTS,
|
|
check_str="role:reader and (project_name:admin or " + "project_name:services)",
|
|
description="Base rule.",
|
|
),
|
|
]
|
|
|
|
|
|
def list_rules():
|
|
return base_rules
|