Skip to content
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

[#3342] feat(core): Refactor the role and privilege model #3494

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public interface Privilege {
/** @return A readable string representation for the privilege. */
String simpleString();

/**
* @return The condition of the privilege. `ALLOW` means that you are allowed to use the
* privilege, `DENY` means that you are denied to use the privilege
*/
Condition condition();

/** The name of this privilege. */
enum Name {
/** The privilege to create a catalog. */
Expand Down Expand Up @@ -116,4 +122,16 @@ public long getHighBits() {
return highBits;
}
}

/**
* The condition of this privilege. `ALLOW` means that you are allowed to use the privilege,
* `DENY` means that you are denied to use the privilege. If you have `ALLOW` and `DENY` for the
* same privilege name of the same securable object, the `DENY` will take effect.
*/
enum Condition {
/** Allow to use the privilege */
ALLOW,
/** Deny to use the privilege */
DENY
}
}
Loading
Loading