feat: Enhance user group management and transaction handling in stored procedures
- Improved user group deletion logic to accurately report success or failure. - Updated user group renaming checks to prevent unintended inserts or updates. - Added documentation on transaction blocking risks during full resets in stored procedures. - Removed unnecessary login scripts from database project.
This commit is contained in:
@@ -49,14 +49,18 @@ let $usr = {
|
||||
},
|
||||
/* Re-fetches a single user and swaps its grid row in place, keeping selection + ribbon
|
||||
(used after changes that only affect that one row: email, group membership). Falls back
|
||||
to a full reload when the row is no longer in the grid. */
|
||||
to a full reload when the row is no longer in the grid. Looks up the current row node by
|
||||
id inside the response handler (not before the request) so two overlapping calls — e.g.
|
||||
two quick checkbox toggles in groupsDlg — each replace whatever row is live at the time
|
||||
their own response arrives, instead of the second call operating on a node the first
|
||||
already detached via replaceWith. */
|
||||
refreshRow: function (rw) {
|
||||
let old = $('#usr' + rw.useraccount_id);
|
||||
if (old.length === 0) { $usr.renderLst(); return; }
|
||||
if ($('#usr' + rw.useraccount_id).length === 0) { $usr.renderLst(); return; }
|
||||
$ocms.postXT({
|
||||
url: $ocms.url('usr/list'), data: { useraccount_id: rw.useraccount_id }, success: function (r) {
|
||||
let fresh = (r.users || [])[0];
|
||||
if (!fresh) { $usr.renderLst(); return; }
|
||||
let old = $('#usr' + rw.useraccount_id);
|
||||
if (!fresh || old.length === 0) { $usr.renderLst(); return; }
|
||||
let selected = old.is('.selected');
|
||||
let row = $usr.buildRow(fresh).toggleClass('selected', selected);
|
||||
old.replaceWith(row);
|
||||
|
||||
Reference in New Issue
Block a user