-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add option to exclude ALL auth from check #19521
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,9 +37,11 @@ | |
* Annotation that takes in any number of {@link Authorities}. This allows us to check if a {@link | ||
* org.hisp.dhis.user.User} has any of the {@link Authorities} passed in. | ||
* | ||
* <p>{@link Authorities#ALL} is automatically added to the check, as having this Authority allows | ||
* access to all methods by default. No need to pass {@link Authorities#ALL} in the arguments. See | ||
* {@link AuthorityInterceptor}. | ||
* <p>{@link Authorities#ALL} is automatically added to the check by default, as having this | ||
* Authority allows access to all methods by default. No need to pass {@link Authorities#ALL} in the | ||
* arguments. See {@link AuthorityInterceptor}. <br> | ||
* {@link Authorities#ALL} will only be excluded from the check if explicitly requested, using the | ||
* optional param `excludeAllAuth=true`. | ||
* | ||
* <p>Can be used at Class or Method level. Usage at the method level will always take precedence | ||
* (matching how Spring works). Class level usage only applies if there is no usage at the method | ||
|
@@ -50,4 +52,6 @@ | |
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface RequiresAuthority { | ||
Authorities[] anyOf(); | ||
|
||
boolean excludeAllAuth() default false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should have javadoc explaining what it means to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've updated the javadocs in this file. Let me know if it's any better/clearer. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this documentation is too much about how it works and to little about what the goal is on a semantic level and why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the javadocs in this file. Let me know if it's any better/clearer.