You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ts...@apache.org on 2018/08/08 20:29:00 UTC
[1/2] wicket git commit: Document role based authorization for
packages
Repository: wicket
Updated Branches:
refs/heads/master 003c72d4c -> 73efc7ce5
Document role based authorization for packages
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2c6130a5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2c6130a5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2c6130a5
Branch: refs/heads/master
Commit: 2c6130a514b5a4699aa1eefe53773b868fab742f
Parents: f8c8736
Author: Jan Mewes <ja...@ks-plus.org>
Authored: Fri Mar 30 12:50:03 2018 +0200
Committer: Jan Mewes <ja...@ks-plus.org>
Committed: Fri Mar 30 12:50:09 2018 +0200
----------------------------------------------------------------------
.gitignore | 2 ++
.../annotations/AuthorizeInstantiation.java | 20 +++++++++++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/2c6130a5/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index a30f497..ea43d21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,8 @@ velocity.log
**velocity.log*
*.idea/
*.iml
+*.ipr
+*.iws
*~
release.properties
**/node/
http://git-wip-us.apache.org/repos/asf/wicket/blob/2c6130a5/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeInstantiation.java
----------------------------------------------------------------------
diff --git a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeInstantiation.java b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeInstantiation.java
index 3bf4600..f2cf20d 100644
--- a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeInstantiation.java
+++ b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeInstantiation.java
@@ -25,20 +25,30 @@ import java.lang.annotation.Target;
/**
* Annotation for configuring what roles are allowed for instantiation the annotated component or
- * package. This annotation can be used for classes and packages, and can be used like this:
- *
+ * package. This annotation can be used for classes and packages. For classes it can be used like this:
+ *
* <pre>
* // only users with role ADMIN are allowed to create instances of this page, whether it is
* // either bookmarkable or not
* @AuthorizeInstantiation("ADMIN")
* public class AdminAnnotationsBookmarkablePage extends WebPage
* </pre>
- *
+ *
+ * For packages the annotation needs to be specified in the <code>package-info.java</code> file:
+ *
+ * <pre>
+ * // only users with role ADMIN are allowed to create instances of pages in this package
+ * @AuthorizeInstantiation("ADMIN")
+ * package package_name;
+ *
+ * import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
+ * </pre>
+ *
* @see org.apache.wicket.authorization.IAuthorizationStrategy
* @see AnnotationsRoleAuthorizationStrategy
* @see AuthorizeActions
* @see AuthorizeAction
- *
+ *
* @author Eelco hillenius
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -49,7 +59,7 @@ public @interface AuthorizeInstantiation {
/**
* Gets the roles that are allowed to take the action.
- *
+ *
* @return the roles that are allowed. Returns a zero length array by default
*/
String[] value() default { };
[2/2] wicket git commit: Merge remote-tracking branch
'tmp/docs/role-based-auth' into HEAD
Posted by ts...@apache.org.
Merge remote-tracking branch 'tmp/docs/role-based-auth' into HEAD
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/73efc7ce
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/73efc7ce
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/73efc7ce
Branch: refs/heads/master
Commit: 73efc7ce55c01ca96848efe22a8b47f1a78eb15f
Parents: 003c72d 2c6130a
Author: Tobias Soloschenko <ts...@apache.org>
Authored: Wed Aug 8 22:28:11 2018 +0200
Committer: Tobias Soloschenko <ts...@apache.org>
Committed: Wed Aug 8 22:28:11 2018 +0200
----------------------------------------------------------------------
.gitignore | 2 ++
.../annotations/AuthorizeInstantiation.java | 20 +++++++++++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------