From a9361fe42851f61b36c1ce6eca1544fae6a9ddbf Mon Sep 17 00:00:00 2001 From: kevgliss Date: Thu, 17 Nov 2016 10:45:26 -0800 Subject: [PATCH] Endpoints should be visible to all. (#508) --- lemur/endpoints/service.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lemur/endpoints/service.py b/lemur/endpoints/service.py index b4c60684..09f94bc4 100644 --- a/lemur/endpoints/service.py +++ b/lemur/endpoints/service.py @@ -8,8 +8,6 @@ .. moduleauthor:: Kevin Glisson """ -from flask import g - from lemur import database from lemur.extensions import metrics from lemur.endpoints.models import Endpoint, Policy, Cipher @@ -121,14 +119,6 @@ def render(args): else: query = database.filter(query, Endpoint, terms) - # we make sure that a user can only use an endpoint they either own are are a member of - admins can see all - if not g.current_user.is_admin: - endpoint_ids = [] - for role in g.current_user.roles: - for endpoint in role.endpoints: - endpoint_ids.append(endpoint.id) - query = query.filter(Endpoint.id.in_(endpoint_ids)) - return database.sort_and_page(query, Endpoint, args)