Merge pull request #233 from dod-ccpo/ui/ws-role-picker

UI/Selector Vue component
This commit is contained in:
andrewdds
2018-08-31 11:25:52 -04:00
committed by GitHub
11 changed files with 210 additions and 16 deletions

View File

@@ -102,3 +102,31 @@ COMPLETION_DATE_RANGES = [
("3-6 months", "3-6 months"),
("Above 12 months", "Above 12 months"),
]
WORKSPACE_ROLES = [
(
"owner",
"Workspace Owner",
"Can add, edit, deactivate access to all projects, environments, and members. Can view budget reports. Can start and edit JEDI Cloud requests.",
),
(
"admin",
"Administrator",
"Can add and edit projects, environments, members, but cannot deactivate. Cannot view budget reports or JEDI Cloud requests.",
),
(
"developer",
"Developer",
"Can view only the projects and environments they are granted access to. Can also view members associated with each environment.",
),
(
"billing_auditor",
"Billing Auditor",
"Can view only the projects and environments they are granted access to. Can also view budgets and reports associated with the workspace.",
),
(
"security_auditor",
"Security Auditor",
"Can view only the projects and environments they are granted access to. Can also view activity logs.",
),
]

View File

@@ -6,6 +6,8 @@ from wtforms.validators import Required, Email, Length
from atst.forms.validators import IsNumber
from atst.forms.fields import SelectField
from .data import WORKSPACE_ROLES
class NewMemberForm(Form):
@@ -14,15 +16,5 @@ class NewMemberForm(Form):
email = EmailField("Email Address", validators=[Required(), Email()])
dod_id = StringField("DOD ID", validators=[Required(), Length(min=10), IsNumber()])
workspace_role = SelectField(
"Workspace Role",
choices=[
("", "Select a Role"),
("admin", "Admin"),
("billing_auditor", "Billing Auditor"),
("ccpo", "CCPO"),
("developer", "Developer"),
("owner", "Owner"),
("security_auditor", "Security Auditor"),
],
validators=[Required()],
"Workspace Role", choices=WORKSPACE_ROLES, validators=[Required()], default=""
)