You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/02/28 15:34:44 UTC
git commit: WICKET-5066 Allow PackageResource to decide itself
whether it could be accepted or not
Updated Branches:
refs/heads/master 71af8b180 -> 1c2e55195
WICKET-5066 Allow PackageResource to decide itself whether it could be accepted or not
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1c2e5519
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1c2e5519
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1c2e5519
Branch: refs/heads/master
Commit: 1c2e55195ae3a31a6c295cd423ff4c6462206511
Parents: 71af8b1
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Feb 28 16:33:25 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Feb 28 16:33:25 2013 +0200
----------------------------------------------------------------------
.../wicket/request/resource/PackageResource.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/1c2e5519/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java b/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
index 3e5824e..4e4b1f3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
+++ b/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
@@ -466,13 +466,18 @@ public class PackageResource extends AbstractResource implements IStaticCacheabl
}
/**
+ * Checks whether access is granted for this resource.
+ *
+ * By default IPackageResourceGuard is used to check the permissions but
+ * the resource itself can also make the check.
+ *
* @param scope
* resource scope
* @param path
* resource path
* @return <code>true<code> if resource access is granted
*/
- private boolean accept(Class<?> scope, String path)
+ protected boolean accept(Class<?> scope, String path)
{
IPackageResourceGuard guard = Application.get()
.getResourceSettings()