Merge pull request #83 from dod-ccpo/users
Create dev users with roles, rather than specifying roles directly
This commit is contained in:
commit
ee4d76f166
@ -3,35 +3,42 @@ import tornado.gen
|
||||
from atst.handler import BaseHandler
|
||||
|
||||
_DEV_USERS = {
|
||||
"ccpo": {
|
||||
"sam": {
|
||||
"id": "164497f6-c1ea-4f42-a5ef-101da278c012",
|
||||
"first_name": "Sam",
|
||||
"last_name": "CCPO",
|
||||
"atat_role": "ccpo"
|
||||
},
|
||||
"owner": {
|
||||
|
||||
"amanda": {
|
||||
"id": "cce17030-4109-4719-b958-ed109dbb87c8",
|
||||
"first_name": "Olivia",
|
||||
"last_name": "Owner",
|
||||
"first_name": "Amanda",
|
||||
"last_name": "Adamson",
|
||||
"atat_role": "default"
|
||||
},
|
||||
"admin": {
|
||||
"brandon": {
|
||||
"id": "66ebf7b8-cbf0-4ed8-a102-5f105330df75",
|
||||
"first_name": "Andreas",
|
||||
"last_name": "Admin",
|
||||
"first_name": "Brandon",
|
||||
"last_name": "Buchannan",
|
||||
"atat_role": "default"
|
||||
},
|
||||
"developer": {
|
||||
"christina": {
|
||||
"id": "7707b9f2-5945-49ae-967a-be65baa88baf",
|
||||
"first_name": "Dominick",
|
||||
"last_name": "Developer",
|
||||
"first_name": "Christina",
|
||||
"last_name": "Collins",
|
||||
"atat_role": "default"
|
||||
},
|
||||
"billing_auditor": {
|
||||
"dominick": {
|
||||
"id": "6978ac0c-442a-46aa-a0c3-ff17b5ec2a8c",
|
||||
"first_name": "Billie",
|
||||
"last_name": "The Billing Auditor",
|
||||
"first_name": "Dominick",
|
||||
"last_name": "Domingo",
|
||||
"atat_role": "default"
|
||||
},
|
||||
"security_auditor": {
|
||||
"erica": {
|
||||
"id": "596fd001-bb1d-4adf-87d8-fa2312e882de",
|
||||
"first_name": "Sawyer",
|
||||
"last_name": "The Security Auditor",
|
||||
"first_name": "Erica",
|
||||
"last_name": "Eichner",
|
||||
"atat_role": "default"
|
||||
},
|
||||
}
|
||||
|
||||
@ -44,9 +51,9 @@ class Dev(BaseHandler):
|
||||
|
||||
@tornado.gen.coroutine
|
||||
def get(self):
|
||||
role = self.get_argument("role", "ccpo")
|
||||
role = self.get_argument("username", "amanda")
|
||||
user = _DEV_USERS[role]
|
||||
yield self._set_user_permissions(user["id"], role)
|
||||
yield self._set_user_permissions(user["id"], user["atat_role"])
|
||||
yield self.login(user)
|
||||
|
||||
@tornado.gen.coroutine
|
||||
|
Loading…
x
Reference in New Issue
Block a user