Bug 11146: Show a go back link on no permission page
When a user does not have permissions for a page or module, the authentication page is displayed with message "Error: You do not have permission to access this page.". Most librarians uses the "previous page" button of their browser to come back on the page they were before trying to get to the non-permitted page. This patch adds a button to help coming back to previous page. It also changes the "Click to log out" link as a button. Test plan : - Define a user with staff permissions but no permission on tools module - Login with this user => You get to intranet home page - Edit URL to go to tools module : cgi-bin/koha/tools/tools-home.pl => You get a page with a red error message and 2 buttons "Previous page" and "Log out" - Click on "Previous page" => Go get to intranet home page - Edit URL to go to tools module : cgi-bin/koha/tools/tools-home.pl - Click on "Log out" button => You are logged-out and get to authentication page : cgi-bin/koha/mainpage.pl?logout.x=1 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Works as intended. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
572c586793
commit
d1bec84142
2 changed files with 18 additions and 2 deletions
|
@ -115,11 +115,20 @@ label {
|
|||
width : 99%;
|
||||
}
|
||||
|
||||
#login #submit {
|
||||
#login #submit, #login .button {
|
||||
font-size: 1.4em;
|
||||
padding : .3em .6em;
|
||||
}
|
||||
|
||||
#login #onerror_actions {
|
||||
margin-bottom: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#login #onerror_actions .button {
|
||||
margin: 3px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align: center;
|
||||
|
|
|
@ -16,7 +16,14 @@
|
|||
<div id="login">
|
||||
<h1><a href="http://koha-community.org">Koha</a></h1>
|
||||
[% IF ( nopermission ) %]
|
||||
<div id="login_error"><strong>Error:</strong> You do not have permission to access this page. <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Click to log out</a></div>
|
||||
<div id="login_error">
|
||||
<strong>Error:</strong>
|
||||
You do not have permission to access this page.
|
||||
</div>
|
||||
<div id="onerror_actions">
|
||||
<a href="javascript:window.history.back()" class="button">Previous page</a>
|
||||
<a href="/cgi-bin/koha/mainpage.pl?logout.x=1" class="button">Log out</a>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[% IF ( timed_out ) %]
|
||||
|
|
Loading…
Reference in a new issue