Repository navigation
allow domain admins to add ldap users - #13952
DaanHoogland wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13952 +/- ##
=========================================
Coverage 20.77% 20.78%
- Complexity 21926 21928 +2
=========================================
Files 6496 6496
Lines 591630 591628 -2
Branches 72591 72591
=========================================
+ Hits 122932 122942 +10
+ Misses 455352 455342 -10
+ Partials 13346 13344 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 25.89% |
| Branch coverage | 20.22% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
6d74ade to
61f3215
Compare
|
|
@blueorangutan package |
|
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19160 |
kiranchavala
left a comment
There was a problem hiding this comment.
When Ldap configuration is linked to a domain , the add LDAP account button is not visible in the UI when domain admin is logged in
[root@ref-trl-12338-k-Mol8-kiran-chavala-mgmt1 ~]# cmk list ldapconfigurations listall=true
Loaded in-built API cache. Failed to read API cache, please run 'sync'.
{
"LdapConfiguration": [
{
"domainid": "15151f02-0d6a-401c-bc9f-35c31712bee1",
"hostname": "10.0.33.32",
"id": "edd0c804-4b82-4e4e-b500-2725325f8d52",
"port": 389
}
],
"count": 1
}
When the ldap configuration is not linked to any domain , then the add LDAP account is visible in the UI when domain admin is logged in
[root@ref-trl-12338-k-Mol8-kiran-chavala-mgmt1 ~]# cmk list ldapconfigurations listall=true
Loaded in-built API cache. Failed to read API cache, please run 'sync'.
{
"LdapConfiguration": [
{
"hostname": "10.0.33.32",
"id": "7137bdff-db71-4495-968f-58476ddf68d3",
"port": 389
}
],
"count": 1
}
|
@DaanHoogland AI suggestion |
|
Hi @DaanHoogland is this PR ready for review or is it still in progress? Should it be targeted for 24.0? |
@nvazquez , now it is. |
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
00e2098 to
8b9b505
Compare
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19880 |
8b9b505 to
a096613
Compare
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19898 |
|



Description
This PR allows domain admins to add LDAP users to accounts in their domain.
ldapCreateAccountandimportLdapUsersare nowauthorizedforAdminandDomainAdmin.@APICommand(authorized=...)on its own does not grant access under dynamic RBAC (the default), so the 4.23 → 24.0 upgrade script (schema-42300to2400.sql) backfillslistLdapUsers,ldapCreateAccount,linkAccountToLdapandimportLdapUsersrole permissions for every role that already hascreateAccount, with the same permission and sort order.isLdapEnabledis set. That flag came fromlistLdapConfigurationscalled without parameters, which returns only global LDAP configurations (domain_id IS NULL). When the only LDAP configuration was linked to a domain, the button was hidden for every role. The check now depends on the logged-in user: for root admins, any configuration counts (listall=true); for everyone else, a global configuration or one linked to their own domain counts.Fixes: #3687
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
🤖 Generated with Claude Code