-
Notifications
You must be signed in to change notification settings - Fork 40
Add name to NamespacePolicy and TablePolicy #2466
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -339,51 +339,48 @@ default Optional<UserTagInfo> getUserTagInfo(String policyName, String username) | |
| } | ||
|
|
||
| /** | ||
| * Applies the given policy to the given namespace. | ||
| * Creates a namespace policy with the given policy and the given namespace. | ||
| * | ||
| * @param namespacePolicyName the namespace policy name | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default void applyPolicyToNamespace(String policyName, String namespaceName) | ||
| default void createNamespacePolicy( | ||
| String namespacePolicyName, String policyName, String namespaceName) | ||
| throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
||
| /** | ||
| * Enables the given policy for the given namespace. | ||
| * Enables a namespace policy that has the given name. | ||
| * | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @param namespacePolicyName the namespace policy name | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default void enableNamespacePolicy(String policyName, String namespaceName) | ||
| throws ExecutionException { | ||
| default void enableNamespacePolicy(String namespacePolicyName) throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
||
| /** | ||
| * Disables the given policy for the given namespace. | ||
| * Disables a namespace policy that has the given name. | ||
| * | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @param namespacePolicyName the namespace policy name | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default void disableNamespacePolicy(String policyName, String namespaceName) | ||
| throws ExecutionException { | ||
| default void disableNamespacePolicy(String namespacePolicyName) throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
||
| /** | ||
| * Retrieves the namespace policy for the given namespace. | ||
| * Retrieves a namespace policy that has the given name. | ||
| * | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @param namespacePolicyName the namespace policy name | ||
| * @return the namespace policy. If the policy is not applied to the namespace, returns an empty | ||
| * optional | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default Optional<NamespacePolicy> getNamespacePolicy(String policyName, String namespaceName) | ||
| default Optional<NamespacePolicy> getNamespacePolicy(String namespacePolicyName) | ||
| throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
@@ -399,55 +396,48 @@ default List<NamespacePolicy> getNamespacePolicies() throws ExecutionException { | |
| } | ||
|
|
||
| /** | ||
| * Applies the given policy to the given table of the given namespace. | ||
| * Creates a table policy with the given policy and the given table. | ||
| * | ||
| * @param tablePolicyName the table policy name | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @param tableName the table name | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default void applyPolicyToTable(String policyName, String namespaceName, String tableName) | ||
| default void createTablePolicy( | ||
|
Collaborator
Author
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. Renamed Also, changed the signature of the |
||
| String tablePolicyName, String policyName, String namespaceName, String tableName) | ||
| throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
||
| /** | ||
| * Enables the given policy of the given table of the given namespace. | ||
| * Enables a table policy that has the given name. | ||
| * | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @param tableName the table name | ||
| * @param tablePolicyName the table policy name | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default void enableTablePolicy(String policyName, String namespaceName, String tableName) | ||
| throws ExecutionException { | ||
| default void enableTablePolicy(String tablePolicyName) throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
||
| /** | ||
| * Disables the given policy of the given table of the given namespace. | ||
| * Disables a table policy that has the given name. | ||
| * | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @param tableName the table name | ||
| * @param tablePolicyName the table policy name | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default void disableTablePolicy(String policyName, String namespaceName, String tableName) | ||
| throws ExecutionException { | ||
| default void disableTablePolicy(String tablePolicyName) throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
||
| /** | ||
| * Retrieves the table policy for the given table of the given namespace. | ||
| * Retrieves a table policy that has the given name. | ||
| * | ||
| * @param policyName the policy name | ||
| * @param namespaceName the namespace name | ||
| * @param tableName the table name | ||
| * @param tablePolicyName the table policy name | ||
| * @return the table policy. If the policy is not applied to the table, returns an empty optional | ||
| * @throws ExecutionException if the operation fails | ||
| */ | ||
| default Optional<TablePolicy> getTablePolicy( | ||
| String policyName, String namespaceName, String tableName) throws ExecutionException { | ||
| default Optional<TablePolicy> getTablePolicy(String tablePolicyName) throws ExecutionException { | ||
| throw new UnsupportedOperationException(CoreError.ABAC_NOT_ENABLED.buildMessage()); | ||
| } | ||
|
|
||
|
|
@@ -731,6 +721,13 @@ interface GroupInfo { | |
|
|
||
| /** The namespace policy. */ | ||
| interface NamespacePolicy { | ||
| /** | ||
| * Returns the namespace policy name. | ||
| * | ||
| * @return the namespace policy name | ||
| */ | ||
| String getName(); | ||
|
Collaborator
Author
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. Added a name to |
||
|
|
||
| /** | ||
| * Returns the policy name. | ||
| * | ||
|
|
@@ -755,6 +752,13 @@ interface NamespacePolicy { | |
|
|
||
| /** The table policy. */ | ||
| interface TablePolicy { | ||
| /** | ||
| * Returns the table policy name. | ||
| * | ||
| * @return the table policy name | ||
| */ | ||
| String getName(); | ||
|
Collaborator
Author
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. Added a name to |
||
|
|
||
| /** | ||
| * Returns the policy name. | ||
| * | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Renamed
applyPolicyToNamespacetocreateNamespacePolicy.Also, changed the signature of the
enableNamespacePolicy,disableNamespacePolicy, andgetNamespacePolicymethods to specify the namespace policy name.