login-dev endpoint accepts role query arg
This commit is contained in:
parent
7d3cd04bdd
commit
f573181154
@ -2,8 +2,22 @@ import tornado.gen
|
||||
|
||||
from atst.handler import BaseHandler
|
||||
|
||||
_DEV_USERS = {
|
||||
"ccpo": {
|
||||
"id": "164497f6-c1ea-4f42-a5ef-101da278c012",
|
||||
"first_name": "Sam",
|
||||
"last_name": "CCPO",
|
||||
},
|
||||
"owner": {
|
||||
"id": "cce17030-4109-4719-b958-ed109dbb87c8",
|
||||
"first_name": "Olivia",
|
||||
"last_name": "Owner",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class Dev(BaseHandler):
|
||||
|
||||
def initialize(self, action, sessions, authz_client):
|
||||
self.action = action
|
||||
self.sessions = sessions
|
||||
@ -11,9 +25,6 @@ class Dev(BaseHandler):
|
||||
|
||||
@tornado.gen.coroutine
|
||||
def get(self):
|
||||
user = {
|
||||
"id": "164497f6-c1ea-4f42-a5ef-101da278c012",
|
||||
"first_name": "Test",
|
||||
"last_name": "User",
|
||||
}
|
||||
role = self.get_argument("role", "ccpo")
|
||||
user = _DEV_USERS[role]
|
||||
yield self.login(user)
|
||||
|
@ -5,7 +5,7 @@
|
||||
</a>
|
||||
|
||||
<a href="/" class="topbar__link topbar__link--secondary">
|
||||
<span>Tech Lead</span>
|
||||
<span>{{ current_user["atat_role"] }}</span>
|
||||
</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
Loading…
x
Reference in New Issue
Block a user