diff --git a/.secrets.baseline b/.secrets.baseline index 7a81d3cb..49a70104 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "^.secrets.baseline$|^.*pgsslrootcert.yml$", "lines": null }, - "generated_at": "2019-11-26T21:33:43Z", + "generated_at": "2019-12-03T19:44:47Z", "plugins_used": [ { "base64_limit": 4.5, @@ -170,7 +170,7 @@ "hashed_secret": "e4f14805dfd1e6af030359090c535e149e6b4207", "is_secret": false, "is_verified": false, - "line_number": 657, + "line_number": 656, "type": "Hex High Entropy String" } ] diff --git a/atst/routes/portfolios/index.py b/atst/routes/portfolios/index.py index 06a4e783..a34d9057 100644 --- a/atst/routes/portfolios/index.py +++ b/atst/routes/portfolios/index.py @@ -11,16 +11,6 @@ from atst.domain.authz.decorator import user_can_access_decorator as user_can from atst.utils.flash import formatted_flash as flash -@portfolios_bp.route("/portfolios") -def portfolios(): - portfolios = Portfolios.for_user(g.current_user) - - if portfolios: - return render_template("portfolios/index.html", page=5, portfolios=portfolios) - else: - return render_template("portfolios/blank_slate.html") - - @portfolios_bp.route("/portfolios/new") def new_portfolio(): form = PortfolioCreationForm() diff --git a/templates/portfolios/blank_slate.html b/templates/portfolios/blank_slate.html deleted file mode 100644 index 62c59aa5..00000000 --- a/templates/portfolios/blank_slate.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} - -{% from "components/empty_state.html" import EmptyState %} -{% from "components/tooltip.html" import Tooltip %} - -{% block content %} - {{ - EmptyState( - action_href="#", - action_label=("portfolios.index.empty.start_button" | translate), - icon="cloud", - message=("portfolios.index.empty.title" | translate), - ) - }} -{% endblock %} diff --git a/tests/routes/portfolios/test_index.py b/tests/routes/portfolios/test_index.py index ef368c3d..dbee544a 100644 --- a/tests/routes/portfolios/test_index.py +++ b/tests/routes/portfolios/test_index.py @@ -65,32 +65,6 @@ def test_create_portfolio_failure(client, user_session): assert len(PortfoliosQuery.get_all()) == original_portfolio_count -def test_portfolio_index_with_existing_portfolios(client, user_session): - portfolio = PortfolioFactory.create() - user_session(portfolio.owner) - - response = client.get(url_for("portfolios.portfolios")) - - assert response.status_code == 200 - assert portfolio.name.encode("utf8") in response.data - assert ( - translate("portfolios.index.empty.start_button").encode("utf8") - not in response.data - ) - - -def test_portfolio_index_without_existing_portfolios(client, user_session): - user = UserFactory.create() - user_session(user) - - response = client.get(url_for("portfolios.portfolios")) - - assert response.status_code == 200 - assert ( - translate("portfolios.index.empty.start_button").encode("utf8") in response.data - ) - - def test_portfolio_reports(client, user_session): portfolio = PortfolioFactory.create( applications=[ diff --git a/tests/test_access.py b/tests/test_access.py index 24948ec2..668d66d9 100644 --- a/tests/test_access.py +++ b/tests/test_access.py @@ -26,7 +26,6 @@ _NO_ACCESS_CHECK_REQUIRED = _NO_LOGIN_REQUIRED + [ "portfolios.accept_invitation", # available to all users; access control is built into invitation logic "portfolios.create_portfolio", # create a portfolio "portfolios.new_portfolio", # all users can create a portfolio - "portfolios.portfolios", # the portfolios list is scoped to the user separately "task_orders.get_started", # all users can start a new TO "users.update_user", # available to all users "users.user", # available to all users diff --git a/tests/test_auth.py b/tests/test_auth.py index d6160491..23dc46d2 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -105,13 +105,6 @@ def test_protected_routes_redirect_to_login(client, app): assert server_name in resp.headers["Location"] -def test_get_protected_route_encodes_redirect(client): - portfolio_index = url_for("portfolios.portfolios") - response = client.get(portfolio_index) - redirect = url_for("atst.root", next=portfolio_index) - assert redirect in response.headers["Location"] - - def test_unprotected_routes_set_user_if_logged_in(client, app, user_session): user = UserFactory.create()