heguanhui opened a new pull request, #63631:
URL: https://github.com/apache/doris/pull/63631
### What problem does this PR solve?
Issue Number: close #63322
Problem Summary: DropRowPolicyCommand does not validate whether the user
specified in the DROP ROW POLICY statement actually exists. This is
inconsistent with CreatePolicyCommand, which checks user existence via
`doesUserExist()`. Without this validation, a typo in the user name could
silently match no policy, or the user might mistakenly believe the drop
succeeded. Also, the auth check should be performed before user existence check
to prevent information leakage.
### Release note
DROP ROW POLICY now validates that the specified user exists, returning an
error if it does not. This makes the behavior consistent with CREATE ROW POLICY.
### Check List (For Author)
- Test
- [x] Unit Test
- Behavior changed:
- [x] Yes. DROP ROW POLICY now throws AnalysisException when the
specified user does not exist, whereas previously it would proceed without
validation.
- Does this need documentation?
- [x] No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]