Switch to using the UserService’s cache of org information for whether a user is an admin of a namespace/org (#2)

This commit is contained in:
Joseph Schorr 2013-12-10 15:49:34 -05:00
parent df1500b6d0
commit 3302b58cc3
3 changed files with 17 additions and 16 deletions

View file

@ -1658,7 +1658,7 @@ def get_user_robots():
@app.route('/api/organization/<orgname>/robots', methods=['GET'])
@api_login_required
def get_org_robots(orgname):
permission = AdministerOrganizationPermission(orgname)
permission = OrganizationMemberPermission(orgname)
if permission.can():
robots = model.list_entity_robots(orgname)
return jsonify({