Infer if the user has no environment role
This commit is contained in:
parent
e9f9ff0cd5
commit
a8b777acda
@ -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)"),
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@
|
||||
<ul v-show='isVisible'>
|
||||
{% for env in project.environments %}
|
||||
|
||||
{% set role = EnvironmentRole.get(member.user_id, env.id).role or 'no_access' %}
|
||||
{% set role = EnvironmentRole.get(member.user_id, env.id).role %}
|
||||
|
||||
<li class='block-list__item'>
|
||||
<edit-workspace-member inline-template initial-data='{{ role }}' v-bind:choices='{{ form.environment_role.choices | tojson }}'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user