Repository navigation
Commit 27b2354
LDAP: always create a contact for a new user
User Management lists users through an inner join on contacts, and the
per-user permission check also depends on the contact, so a user without
one cannot be found, viewed or given a role. That is the state an LDAP
user was left in whenever the contact could not be saved:
- the directory had no givenName (CContact requires a first name),
- another contact already had the same e-mail address, or
- the attributes array was empty, which skipped the contact entirely.
The login name is now used as the first name when the directory has none,
the contact is saved once more without the e-mail address if the first
save fails, and the contact is created even with no attributes. With the
contact owner fix in the previous commit, a first LDAP login now produces
a user that appears under Users > Inactive Users, where an admin can
assign a role.
Refs #320
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016CP89WVmGZ1VVCCZMS6ntN1 parent d2155cc commit 27b2354
1 file changed
Lines changed: 30 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
182 | 197 | | |
183 | 198 | | |
184 | 199 | | |
| |||
0 commit comments