Remove route for applications.team
This commit is contained in:
parent
50ceaa39de
commit
de74c1f533
@ -80,13 +80,6 @@ def render_team_page(application):
|
||||
)
|
||||
|
||||
|
||||
@applications_bp.route("/applications/<application_id>/team")
|
||||
@user_can(Permissions.VIEW_APPLICATION, message="view portfolio applications")
|
||||
def team(application_id):
|
||||
application = Applications.get(resource_id=application_id)
|
||||
return render_team_page(application)
|
||||
|
||||
|
||||
@applications_bp.route("/application/<application_id>/team", methods=["POST"])
|
||||
@user_can(Permissions.EDIT_APPLICATION_MEMBER, message="update application member")
|
||||
def update_team(application_id):
|
||||
@ -115,7 +108,7 @@ def update_team(application_id):
|
||||
|
||||
return redirect(
|
||||
url_for(
|
||||
"applications.team",
|
||||
"applications.settings",
|
||||
application_id=application_id,
|
||||
fragment="application-members",
|
||||
_anchor="application-members",
|
||||
@ -172,7 +165,7 @@ def create_member(application_id):
|
||||
|
||||
return redirect(
|
||||
url_for(
|
||||
"applications.team",
|
||||
"applications.settings",
|
||||
application_id=application_id,
|
||||
fragment="application-members",
|
||||
_anchor="application-members",
|
||||
@ -197,7 +190,7 @@ def remove_member(application_id, application_role_id):
|
||||
|
||||
return redirect(
|
||||
url_for(
|
||||
"applications.team",
|
||||
"applications.settings",
|
||||
_anchor="application-members",
|
||||
application_id=g.application.id,
|
||||
fragment="application-members",
|
||||
|
@ -34,11 +34,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.app-team-settings-link {
|
||||
font-size: $small-font-size;
|
||||
font-weight: $font-normal;
|
||||
}
|
||||
|
||||
.environment-roles {
|
||||
padding: 0 ($gap * 3) ($gap * 3);
|
||||
|
||||
|
@ -4,12 +4,6 @@
|
||||
|
||||
{% for env_form in members_form.envs %}
|
||||
{% if env_form.env_id.data == env['id'] %}
|
||||
<div class='app-team-settings-link'>
|
||||
{{ 'fragments.edit_environment_team_form.add_new_member_text' | translate }}
|
||||
<a href='{{ url_for("applications.team", application_id=application.id) }}'>
|
||||
{{ 'fragments.edit_environment_team_form.add_new_member_link' | translate }}
|
||||
</a>
|
||||
</div>
|
||||
<form
|
||||
action="{{ url_for('applications.update_env_roles', environment_id=env['id']) }}"
|
||||
method="post">
|
||||
|
@ -51,12 +51,6 @@
|
||||
<span>{{ "portfolios.applications.app_settings_text" | translate }}</span>
|
||||
</a>
|
||||
<div class='separator'></div>
|
||||
<a
|
||||
href="{{ url_for('applications.team', application_id=application.id) }}"
|
||||
class='icon-link'>
|
||||
<span>{{ "portfolios.applications.team_text" | translate }} ({{ application.members | length }})</span>
|
||||
</a>
|
||||
<div class='separator'></div>
|
||||
{% set has_environments = 0 < (application.environments|length) %}
|
||||
<a class='icon-link triangle-box' v-on:click="toggleSection('{{ section_name }}')" disabled="{{ not has_environments }}">
|
||||
<span>Environments ({{ application.environments|length }})</span>
|
||||
|
@ -10,16 +10,6 @@ from atst.forms.data import ENV_ROLE_NO_ACCESS as NO_ACCESS
|
||||
from tests.factories import *
|
||||
|
||||
|
||||
def test_application_team(client, user_session):
|
||||
portfolio = PortfolioFactory.create()
|
||||
application = ApplicationFactory.create(portfolio=portfolio)
|
||||
|
||||
user_session(portfolio.owner)
|
||||
|
||||
response = client.get(url_for("applications.team", application_id=application.id))
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_update_team_permissions(client, user_session):
|
||||
application = ApplicationFactory.create()
|
||||
owner = application.portfolio.owner
|
||||
@ -183,7 +173,7 @@ def test_create_member(monkeypatch, client, user_session, session):
|
||||
|
||||
assert response.status_code == 302
|
||||
expected_url = url_for(
|
||||
"applications.team",
|
||||
"applications.settings",
|
||||
application_id=application.id,
|
||||
fragment="application-members",
|
||||
_anchor="application-members",
|
||||
@ -220,7 +210,7 @@ def test_remove_member_success(client, user_session):
|
||||
|
||||
assert response.status_code == 302
|
||||
assert response.location == url_for(
|
||||
"applications.team",
|
||||
"applications.settings",
|
||||
_anchor="application-members",
|
||||
_external=True,
|
||||
application_id=application.id,
|
||||
@ -244,7 +234,7 @@ def test_remove_new_member_success(client, user_session):
|
||||
|
||||
assert response.status_code == 302
|
||||
assert response.location == url_for(
|
||||
"applications.team",
|
||||
"applications.settings",
|
||||
_anchor="application-members",
|
||||
_external=True,
|
||||
application_id=application.id,
|
||||
|
@ -585,20 +585,6 @@ def test_task_orders_new_post_routes(post_url_assert_status):
|
||||
post_url_assert_status(rando, url, 404, data=data)
|
||||
|
||||
|
||||
def test_applications_application_team_access(get_url_assert_status):
|
||||
ccpo = UserFactory.create_ccpo()
|
||||
rando = UserFactory.create()
|
||||
|
||||
portfolio = PortfolioFactory.create()
|
||||
application = ApplicationFactory.create(portfolio=portfolio)
|
||||
|
||||
url = url_for("applications.team", application_id=application.id)
|
||||
|
||||
get_url_assert_status(ccpo, url, 200)
|
||||
get_url_assert_status(portfolio.owner, url, 200)
|
||||
get_url_assert_status(rando, url, 404)
|
||||
|
||||
|
||||
def test_portfolio_delete_access(post_url_assert_status):
|
||||
rando = UserFactory.create()
|
||||
owner = UserFactory.create()
|
||||
|
Loading…
x
Reference in New Issue
Block a user