Work in progress: Start on org view and finish up the team members view
This commit is contained in:
parent
e6fadbca05
commit
61e9b1629d
4 changed files with 51 additions and 7 deletions
|
@ -298,8 +298,8 @@ def get_organization_team_members(orgname, teamname):
|
|||
if current_user.is_anonymous():
|
||||
abort(404)
|
||||
|
||||
# TODO: determine whether the user has permission to view the team members of this team
|
||||
# (i.e. they are a member of the team [maybe??] OR they are an admin of the org)
|
||||
# TODO: determine whether the user has permission to view the members of this team
|
||||
# (i.e. they are a member of the team OR they are an admin of the org)
|
||||
user = current_user.db_user()
|
||||
team = None
|
||||
|
||||
|
@ -309,8 +309,11 @@ def get_organization_team_members(orgname, teamname):
|
|||
abort(404)
|
||||
|
||||
members = model.get_organization_team_members(team.id)
|
||||
|
||||
# TODO: determine whether the user has permission to *edit* the members of this team.
|
||||
return jsonify({
|
||||
'members': { m.username : member_view(m) for m in members }
|
||||
'members': { m.username : member_view(m) for m in members },
|
||||
'can_edit': True
|
||||
})
|
||||
|
||||
|
||||
|
|
Reference in a new issue