Skip to content

[fix](fe) Validate user/role existence in SHOW ROW POLICY command#63317

Open
heguanhui wants to merge 1 commit into
apache:masterfrom
heguanhui:fix/show-row-policy-validate-user-role
Open

[fix](fe) Validate user/role existence in SHOW ROW POLICY command#63317
heguanhui wants to merge 1 commit into
apache:masterfrom
heguanhui:fix/show-row-policy-validate-user-role

Conversation

@heguanhui
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary: SHOW ROW POLICY FOR and SHOW ROW POLICY FOR ROLE do not validate whether the specified user or role exists. This is inconsistent with CREATE ROW POLICY which does validate, and allows confusing behavior where a non-existent user/role is silently accepted.

Release note

SHOW ROW POLICY now reports an error when the specified user or role does not exist.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test
    • No need to test
  • Behavior changed:

    • Yes. SHOW ROW POLICY now throws an error for non-existent user/role instead of silently returning empty results.
  • Does this need documentation?

    • No.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

### What problem does this PR solve?

Issue Number: close #xxx

Problem Summary: SHOW ROW POLICY FOR <user> and SHOW ROW POLICY FOR ROLE <role> do not validate whether the specified user or role exists. This is inconsistent with CREATE ROW POLICY which does validate, and allows confusing behavior where a non-existent user/role is silently accepted.

### Release note

SHOW ROW POLICY now reports an error when the specified user or role does not exist.

### Check List (For Author)

- Test: Regression test
- Behavior changed: Yes. SHOW ROW POLICY now throws an error for non-existent user/role instead of silently returning empty results.
- Does this need documentation: No
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

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.

2 participants