cleanup unused portfolio roles
This commit is contained in:
@@ -54,112 +54,6 @@ ATAT_ROLES = [
|
||||
"permissions": [Permissions.REQUEST_JEDI_PORTFOLIO],
|
||||
},
|
||||
]
|
||||
PORTFOLIO_ROLES = [
|
||||
{
|
||||
"name": "owner",
|
||||
"display_name": "Portfolio Owner",
|
||||
"description": "Adds, edits, deactivates access to all applications, environments, and members. Views budget reports. Initiates and edits JEDI Cloud requests.",
|
||||
"permissions": [
|
||||
Permissions.REQUEST_JEDI_PORTFOLIO,
|
||||
Permissions.VIEW_ORIGINAL_JEDI_REQEUST,
|
||||
Permissions.VIEW_USAGE_REPORT,
|
||||
Permissions.VIEW_USAGE_DOLLARS,
|
||||
Permissions.ADD_AND_ASSIGN_CSP_ROLES,
|
||||
Permissions.REMOVE_CSP_ROLES,
|
||||
Permissions.REQUEST_NEW_CSP_ROLE,
|
||||
Permissions.ASSIGN_AND_UNASSIGN_ATAT_ROLE,
|
||||
Permissions.VIEW_ASSIGNED_ATAT_ROLE_CONFIGURATIONS,
|
||||
Permissions.VIEW_ASSIGNED_CSP_ROLE_CONFIGURATIONS,
|
||||
Permissions.DEACTIVATE_PORTFOLIO,
|
||||
Permissions.VIEW_ATAT_PERMISSIONS,
|
||||
Permissions.VIEW_PORTFOLIO,
|
||||
Permissions.VIEW_PORTFOLIO_MEMBERS,
|
||||
Permissions.EDIT_PORTFOLIO_INFORMATION,
|
||||
Permissions.ADD_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.DELETE_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.DEACTIVATE_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.VIEW_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.RENAME_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.ADD_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.DELETE_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.DEACTIVATE_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.VIEW_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.RENAME_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.VIEW_PORTFOLIO_AUDIT_LOG,
|
||||
Permissions.VIEW_TASK_ORDER,
|
||||
Permissions.UPDATE_TASK_ORDER,
|
||||
Permissions.ADD_TASK_ORDER_OFFICER,
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"display_name": "Administrator",
|
||||
"description": "Adds and edits applications, environments, members, but cannot deactivate. Cannot view budget reports or JEDI Cloud requests.",
|
||||
"permissions": [
|
||||
Permissions.VIEW_USAGE_REPORT,
|
||||
Permissions.ADD_AND_ASSIGN_CSP_ROLES,
|
||||
Permissions.REMOVE_CSP_ROLES,
|
||||
Permissions.REQUEST_NEW_CSP_ROLE,
|
||||
Permissions.ASSIGN_AND_UNASSIGN_ATAT_ROLE,
|
||||
Permissions.VIEW_ASSIGNED_ATAT_ROLE_CONFIGURATIONS,
|
||||
Permissions.VIEW_ASSIGNED_CSP_ROLE_CONFIGURATIONS,
|
||||
Permissions.VIEW_PORTFOLIO,
|
||||
Permissions.VIEW_PORTFOLIO_MEMBERS,
|
||||
Permissions.EDIT_PORTFOLIO_INFORMATION,
|
||||
Permissions.ADD_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.DELETE_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.DEACTIVATE_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.VIEW_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.RENAME_APPLICATION_IN_PORTFOLIO,
|
||||
Permissions.ADD_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.DELETE_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.DEACTIVATE_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.VIEW_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.RENAME_ENVIRONMENT_IN_APPLICATION,
|
||||
Permissions.VIEW_PORTFOLIO_AUDIT_LOG,
|
||||
Permissions.VIEW_TASK_ORDER,
|
||||
Permissions.UPDATE_TASK_ORDER,
|
||||
Permissions.ADD_TASK_ORDER_OFFICER,
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "developer",
|
||||
"display_name": "Developer",
|
||||
"description": "Views only the applications and environments they are granted access to. Can also view members associated with each environment.",
|
||||
"permissions": [Permissions.VIEW_USAGE_REPORT, Permissions.VIEW_PORTFOLIO],
|
||||
},
|
||||
{
|
||||
"name": "billing_auditor",
|
||||
"display_name": "Billing Auditor",
|
||||
"description": "Views only the applications and environments they are granted access to. Can also view budgets and reports associated with the portfolio.",
|
||||
"permissions": [
|
||||
Permissions.VIEW_USAGE_REPORT,
|
||||
Permissions.VIEW_USAGE_DOLLARS,
|
||||
Permissions.VIEW_PORTFOLIO,
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "security_auditor",
|
||||
"description": "Views only the applications and environments they are granted access to. Can also view activity logs.",
|
||||
"display_name": "Security Auditor",
|
||||
"permissions": [
|
||||
Permissions.VIEW_ASSIGNED_ATAT_ROLE_CONFIGURATIONS,
|
||||
Permissions.VIEW_ASSIGNED_CSP_ROLE_CONFIGURATIONS,
|
||||
Permissions.VIEW_ATAT_PERMISSIONS,
|
||||
Permissions.VIEW_PORTFOLIO,
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "officer",
|
||||
"description": "Officer involved with setting up a Task Order",
|
||||
"display_name": "Task Order Officer",
|
||||
"permissions": [
|
||||
Permissions.VIEW_PORTFOLIO,
|
||||
Permissions.VIEW_USAGE_REPORT,
|
||||
Permissions.VIEW_USAGE_DOLLARS,
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
_VIEW_PORTFOLIO_PERMISSION_SETS = [
|
||||
{
|
||||
|
@@ -1,4 +1,3 @@
|
||||
from atst.domain.permission_sets import PORTFOLIO_ROLES as PORTFOLIO_ROLE_DEFINITIONS
|
||||
from atst.utils.localization import translate, translate_duration
|
||||
|
||||
|
||||
@@ -107,12 +106,6 @@ COMPLETION_DATE_RANGES = [
|
||||
("Above 12 months", "Above 12 months"),
|
||||
]
|
||||
|
||||
PORTFOLIO_ROLES = [
|
||||
(role["name"], {"name": role["display_name"], "description": role["description"]})
|
||||
for role in PORTFOLIO_ROLE_DEFINITIONS
|
||||
if role["name"] is not "officer"
|
||||
]
|
||||
|
||||
ENVIRONMENT_ROLES = [
|
||||
(
|
||||
"developer",
|
||||
|
@@ -11,11 +11,7 @@ from atst.domain.environments import Environments
|
||||
from atst.domain.environment_roles import EnvironmentRoles
|
||||
from atst.services.invitation import Invitation as InvitationService
|
||||
import atst.forms.portfolio_member as member_forms
|
||||
from atst.forms.data import (
|
||||
ENVIRONMENT_ROLES,
|
||||
ENV_ROLE_MODAL_DESCRIPTION,
|
||||
PORTFOLIO_ROLE_DEFINITIONS,
|
||||
)
|
||||
from atst.forms.data import ENVIRONMENT_ROLES, ENV_ROLE_MODAL_DESCRIPTION
|
||||
from atst.domain.authz import Authorization
|
||||
from atst.models.permissions import Permissions
|
||||
|
||||
@@ -45,7 +41,6 @@ def portfolio_members(portfolio_id):
|
||||
return render_template(
|
||||
"portfolios/members/index.html",
|
||||
portfolio=portfolio,
|
||||
role_choices=PORTFOLIO_ROLE_DEFINITIONS,
|
||||
status_choices=MEMBER_STATUS_CHOICES,
|
||||
members=members_list,
|
||||
)
|
||||
|
Reference in New Issue
Block a user