Skip to content

Commit 9c368e2

Browse files
committed
fix(ui): update bulk-action confirm prompts to match actual behavior
The delete-groups, delete-computers, disable-users, and disable-computers confirm prompts still read "not yet implemented — will return 501" from before the Phase 3 bulk actions landed. Review on PR #571 flagged this as misleading: group/computer delete now go through DeleteByDN and user/computer disable are wired to the v1.12 simple-ldap-go DisableUser/DisableComputer helpers on AD backends. Rewording: - Delete prompts now say "This cannot be undone." (matches the single-entity drawer Delete button already uses). - Disable prompts now carry the AD caveat ("Active Directory only — returns 501 on OpenLDAP") because the handler is gated on a.ldapConfig.IsActiveDirectory and the client can't detect the backend from the browser. Clients on OpenLDAP see the 501 + bulkNotImplementedMessage contract unchanged. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
1 parent d98d3dd commit 9c368e2

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

internal/web/static/js/v2-bulk.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,19 @@
187187
function openDisableUsers() {
188188
if (selected.size === 0) return;
189189

190+
// Disable flips the AD userAccountControl ACCOUNTDISABLE bit (0x2)
191+
// via simple-ldap-go v1.12's DisableUserContext. The endpoint is
192+
// gated on a.ldapConfig.IsActiveDirectory in the Go handler; the
193+
// client can't detect the backend from here, so the prompt says
194+
// "only on Active Directory" rather than pretending it works
195+
// everywhere. On OpenLDAP the POST returns 501 with the
196+
// bulkNotImplementedMessage contract.
190197
if (
191198
!window.confirm(
192199
"Disable " +
193200
selected.size +
194-
" user(s)? (Note: not yet implemented — will return 501)"
201+
" user(s)? Accounts can be re-enabled later. " +
202+
"(Active Directory only — returns 501 on OpenLDAP.)"
195203
)
196204
)
197205
return;
@@ -237,7 +245,7 @@
237245
!window.confirm(
238246
"Delete " +
239247
selected.size +
240-
" group(s)? (Note: not yet implemented — will return 501)"
248+
" group(s)? This cannot be undone."
241249
)
242250
)
243251
return;
@@ -250,11 +258,13 @@
250258
function openDisableComputers() {
251259
if (selected.size === 0) return;
252260

261+
// See openDisableUsers for the AD-only rationale.
253262
if (
254263
!window.confirm(
255264
"Disable " +
256265
selected.size +
257-
" computer(s)? (Note: not yet implemented — will return 501)"
266+
" computer(s)? " +
267+
"(Active Directory only — returns 501 on OpenLDAP.)"
258268
)
259269
)
260270
return;
@@ -269,7 +279,7 @@
269279
!window.confirm(
270280
"Delete " +
271281
selected.size +
272-
" computer(s)? (Note: not yet implemented — will return 501)"
282+
" computer(s)? This cannot be undone."
273283
)
274284
)
275285
return;

0 commit comments

Comments
 (0)