Skip to content

Support composed role authorization annotations - #1976

Open
Jennydou517 wants to merge 1 commit into
apache:masterfrom
Jennydou517:feature/meta-authorization-1958
Open

Jennydou517 wants to merge 1 commit into
apache:masterfrom
Jennydou517:feature/meta-authorization-1958

Conversation

@Jennydou517

Copy link
Copy Markdown
Contributor

Fixes #1958.

  1. When a page or component class uses a custom annotation, Wicket checks whether that annotation carries role authorization rules.
  2. Custom annotations can be nested at any depth. Wicket continues through nested annotations whether or not it finds a rule at the current level. It visits each annotation type only once so that circular references cannot cause an infinite loop.
  3. When a class declares authorization rules directly and also uses a custom annotation that carries authorization rules, Wicket checks the applicable rules from both sources. Access is granted only if all applicable rules pass. The existing fallback to package-level rules is preserved.
  4. The new test covers eight levels of nesting, with one instantiation rule declared directly on the class and one rule at each of the first and eighth levels. A user can instantiate the component only if they have all three required roles. All 72 tests in wicket-auth-roles passed, and the module packaged successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support meta-annotations for the wicket-auth-roles annotations

1 participant