From a8b777acda5ded65abf798d8ae89f91f2b36e80f Mon Sep 17 00:00:00 2001 From: Montana Date: Thu, 20 Sep 2018 15:04:33 -0400 Subject: [PATCH] Infer if the user has no environment role --- atst/forms/data.py | 39 -------------------- js/components/forms/edit_workspace_member.js | 4 +- templates/workspaces/members/edit.html | 2 +- 3 files changed, 3 insertions(+), 42 deletions(-) diff --git a/atst/forms/data.py b/atst/forms/data.py index 7be3e2ad..ebdeacbb 100644 --- a/atst/forms/data.py +++ b/atst/forms/data.py @@ -186,45 +186,6 @@ ENVIRONMENT_ROLES = [ ), ] -ENVIRONMENT_ROLES = [ - ("no_access", {"name": "no access", "description": "No environment access."}), - ( - "database_admin", - { - "name": "Database Administrator", - "description": "Configures cloud-based database services.", - }, - ), - ( - "devops", - { - "name": "DevOps", - "description": "Provisions, deprovisions, and deploys cloud-based IaaS and PaaS computing, networking, and storage services, including pre-configured machine images.", - }, - ), - ( - "billing_admin", - { - "name": "Billing Administrator", - "description": "Views cloud resource usage, budget reports, and invoices; Tracks budgets, including spend reports, cost planning and projections, and sets limits based on cloud service usage.", - }, - ), - ( - "security_admin", - { - "name": "Security Administrator", - "description": "Accesses information security and control tools of cloud resources which include viewing cloud resource usage logging, user roles and permissioning history.", - }, - ), - ( - "financial_auditor", - { - "name": "Financial Auditor", - "description": "Views cloud resource usage and budget reports.", - }, - ), -] - FUNDING_TYPES = [ ("", "- Select -"), ("RDTE", "Research, Development, Testing & Evaluation (RDT&E)"), diff --git a/js/components/forms/edit_workspace_member.js b/js/components/forms/edit_workspace_member.js index 00d60a2c..4785217c 100644 --- a/js/components/forms/edit_workspace_member.js +++ b/js/components/forms/edit_workspace_member.js @@ -45,10 +45,10 @@ export default { return this.choices[arr][1].name } } - return this.value + return this.value ? this.value : "no access" }, label_class: function () { - return this.value === "no_access" ? + return this.displayName === "no access" ? "label" : "label label--success" } } diff --git a/templates/workspaces/members/edit.html b/templates/workspaces/members/edit.html index 774541cd..44eac364 100644 --- a/templates/workspaces/members/edit.html +++ b/templates/workspaces/members/edit.html @@ -64,7 +64,7 @@