lsy3993 opened a new pull request, #51782: URL: https://github.com/apache/doris/pull/51782
### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: We can create user like this `CREATE USER IF NOT EXISTS 'zzzzzzz'@'192.168.%' IDENTIFIED BY '12345' DEFAULT ROLE 'test_role_for_show_create_user' PASSWORD_EXPIRE INTERVAL 10 DAY FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 1 DAY;` But we can not show the users' create stmt, it's hard for admin or root to manage all users. So this PR supports 'show create user' in two ways: 1. `show all create user` 3. `show create user [email protected].%` (show create user via userIdentity) this is the result, it has two columns: | User Identity | Create Stmt | | --- | --- | | admin | CREATE USER 'admin'@'%' IDENTIFIED BY *** DEFAULT ROLE 'admin,default_role_rbac_admin@%' PASSWORD_EXPIRE NEVER PASSWORD_HISTORY NO_RESTRICTION FAILED_LOGIN_ATTEMPTS DISABLED PASSWORD_LOCK_TIME DISABLED "ADMIN" | | root | CREATE USER 'root'@'%' IDENTIFIED BY *** DEFAULT ROLE 'default_role_rbac_root@%,operator' PASSWORD_EXPIRE NEVER PASSWORD_HISTORY NO_RESTRICTION FAILED_LOGIN_ATTEMPTS DISABLED PASSWORD_LOCK_TIME DISABLED "ROOT" | | zzzzzzz | CREATE USER 'zzzzzzz'@'192.168.%' IDENTIFIED BY *** DEFAULT ROLE '[email protected].%,test_role_for_show_create_user' PASSWORD_EXPIRE 864000 PASSWORD_HISTORY NO_RESTRICTION FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 86400 | ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [x] Regression test - [x] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [x] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [x] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 --> When this PR is merged, I will add documentation. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into --> -- 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]
