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:
parent
df1500b6d0
commit
3302b58cc3
3 changed files with 17 additions and 16 deletions
|
@ -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({
|
||||
|
|
Reference in a new issue