-
Notifications
You must be signed in to change notification settings - Fork 1.3k
server: fix exception while list users with keyword #7169
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
server: fix exception while list users with keyword #7169
Conversation
old:
```
(localcloud) 🐱 > list users keyword=ADMIN
🙈 Error: (HTTP 530, error code 4250) Caught: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT user_view.id, user_view.uuid, user_view.username, user_view.password, user_view.firstname, user_view.lastname, user_view.email, user_view.state, user_view.api_key, user_view.secret_key, user_view.created, user_view.removed, user_view.timezone, user_view.registration_token, user_view.is_registered, user_view.incorrect_login_attempts, user_view.account_id, user_view.account_uuid, user_view.account_name, user_view.account_type, user_view.account_role_id, user_view.domain_id, user_view.domain_uuid, user_view.domain_name, user_view.domain_path, user_view.job_id, user_view.job_uuid, user_view.job_status, user_view.default, user_view.source FROM user_view WHERE user_view.account_id=2 AND user_view.account_type != 5 AND user_view.id != 1 AND (user_view.username LIKE x'2541444D494E25' OR user_view.firstname LIKE x'2541444D494E25' OR user_view.lastname LIKE x'2541444D494E25' OR user_view.email LIKE x'2541444D494E25' OR user_view.state LIKE x'2541444D494E25' OR user_view.account_name LIKE x'2541444D494E25' OR user_view.account_type = ** NOT SPECIFIED ** ) AND user_view.removed IS NULL ORDER BY user_view.id ASC LIMIT 0, 500
```
new:
```
(localcloud) 🐱 > list users keyword=admin listall=true filter=username,roletype
{
"count": 3,
"user": [
{
"roletype": "Admin",
"username": "admin"
},
{
"roletype": "Admin",
"username": "admin-kubeadmin"
},
{
"roletype": "DomainAdmin",
"username": "testadmin"
}
]
}
```
and
```
(localcloud) 🐱 > list users keyword=domain_admin listall=true filter=username,roletype
{
"count": 1,
"user": [
{
"roletype": "DomainAdmin",
"username": "testadmin"
}
]
}
```
|
SonarCloud Quality Gate failed. |
Codecov Report
@@ Coverage Diff @@
## 4.17 #7169 +/- ##
=========================================
Coverage 10.37% 10.38%
Complexity 6650 6650
=========================================
Files 2453 2453
Lines 242439 242444 +5
Branches 37938 37941 +3
=========================================
+ Hits 25164 25171 +7
+ Misses 214165 214155 -10
- Partials 3110 3118 +8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
how about |
|
@blueorangutan package |
|
@vladimirpetrov a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5512 |
vladimirpetrov
left a comment
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.
LGTM based on manual testing.
stephankruggg
left a comment
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.
CLGTM, did not manually test it
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5538 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-6144)
|
|
errors are not specific to this PR and addressed in #7190 |
* 4.17: server: fix exception while list users with keyword (#7169)









Description
This PR fixes #7165
old:
new:
and
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?