Hook up the "Add Environment Access" link when adding a member

This commit is contained in:
Patrick Smith
2018-09-25 16:18:12 -04:00
parent 3eeacc41fb
commit 648964dc1e
2 changed files with 11 additions and 5 deletions

View File

@@ -89,7 +89,14 @@ def show_workspace(workspace_id):
@bp.route("/workspaces/<workspace_id>/members")
def workspace_members(workspace_id):
workspace = Workspaces.get_with_members(g.current_user, workspace_id)
return render_template("workspaces/members/index.html", workspace=workspace)
new_member_name = http_request.args.get("newMemberName")
new_member = next(
filter(lambda m: m.user_name == new_member_name, workspace.members), None
)
return render_template(
"workspaces/members/index.html", workspace=workspace, new_member=new_member
)
@bp.route("/workspaces/<workspace_id>/reports")