mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 14:33:09 +00:00
Add explanatory text to AuthorizeException generated by feedback page permission failure (trivial change)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4455 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -50,6 +50,8 @@ browse.sort-by.dateaccessioned = submit date
|
|||||||
browse.order.asc = Ascending
|
browse.order.asc = Ascending
|
||||||
browse.order.desc = Descending
|
browse.order.desc = Descending
|
||||||
|
|
||||||
|
feedback.error.forbidden = The feedback mail page may only be invoked from another DSpace page
|
||||||
|
|
||||||
help.collection-admin = /help/collection-admin.html
|
help.collection-admin = /help/collection-admin.html
|
||||||
help.index = /help/index.html
|
help.index = /help/index.html
|
||||||
help.site-admin = /help/site-admin.html
|
help.site-admin = /help/site-admin.html
|
||||||
|
@@ -97,14 +97,14 @@ public class SendFeedbackAction extends AbstractAction
|
|||||||
if(fromPage.indexOf(allowedReferrersSplit[i]) != -1)
|
if(fromPage.indexOf(allowedReferrersSplit[i]) != -1)
|
||||||
{
|
{
|
||||||
validReferral = true;
|
validReferral = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String basicHost = "";
|
String basicHost = "";
|
||||||
if (host.equals("localhost") || host.equals("127.0.0.1")
|
if (host.equals("localhost") || host.equals("127.0.0.1")
|
||||||
|| host.equals(InetAddress.getLocalHost().getHostAddress()))
|
|| host.equals(InetAddress.getLocalHost().getHostAddress()))
|
||||||
basicHost = host;
|
basicHost = host;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -116,7 +116,8 @@ public class SendFeedbackAction extends AbstractAction
|
|||||||
|
|
||||||
if ((fromPage == null) || ((fromPage.indexOf(basicHost) == -1) && (validReferral == false)))
|
if ((fromPage == null) || ((fromPage.indexOf(basicHost) == -1) && (validReferral == false)))
|
||||||
{
|
{
|
||||||
throw new AuthorizeException();
|
// N.B. must use old message catalog because Cocoon i18n is only available to transformed pages.
|
||||||
|
throw new AuthorizeException(I18nUtil.getMessage("feedback.error.forbidden"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// User email from context
|
// User email from context
|
||||||
|
Reference in New Issue
Block a user