-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow GOV.UK Admins to remove their access to apps
Users are required to confirm the removal of access to avoid the problem that exists in the current `/users/<id>/edit` page where Publishing Managers can accidentally remove their access to an application but then have to open a support request to get that access back again. NOTE. The functionality in this PR is currently restricted to GOV.UK Admins but will be made available to Publishing Managers soon. I experimented with using the button component for the "Remove access" button but couldn't work out how to pass the visually hidden span into it.
- Loading branch information
Showing
10 changed files
with
182 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<% content_for :title, "Remove access to #{@application.name}" %> | ||
|
||
<% content_for :breadcrumbs, | ||
render("govuk_publishing_components/components/breadcrumbs", { | ||
collapse_on_mobile: true, | ||
breadcrumbs: [ | ||
{ | ||
title: "Dashboard", | ||
url: root_path, | ||
}, | ||
{ | ||
title: "GOV.UK apps", | ||
url: account_applications_path, | ||
}, | ||
{ | ||
title: "Remove access", | ||
}, | ||
] | ||
}) | ||
%> | ||
|
||
<p class="govuk-body">Are you sure you want to remove access to <%= @application.name %>?</p> | ||
|
||
<%= form_with url: account_application_signin_permission_path(@application), method: :delete do |form| %> | ||
<div class="govuk-button-group"> | ||
<%= render "govuk_publishing_components/components/button", { | ||
text: "Confirm", | ||
} %> | ||
|
||
<%= link_to "Cancel", account_applications_path, class: "govuk-link govuk-link--no-visited-state" %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters