Files
BetterDesk/web-nodejs/services
UNITRONIX 18ed13074f fix(panel): repair user group policies and the Web Remote viewer
Refs #512
Refs #514

Two panel regressions that each made a working feature look broken.

#512 — user groups could not be saved or deleted:
panelAccessPolicyService.resolveCeilingForSubject() calls
db.getUserGroupMembers(), which existed in neither the SQLite nor the
PostgreSQL adapter, nor in the services/database.js facade. Any group save
or delete failed with "db.getUserGroupMembers is not a function" after
leaving a half-created group row behind. The suite stayed green because
tests/panel-access.ceiling.test.js mocks the function, so no test reached
the real adapter.
  - add getUserGroupMembers(guid) to both adapters and the facade
  - new regression test uses the real SQLite adapter end to end
  - the empty-group ceiling clamp is intentionally unchanged (audit H7);
    the group list now explains why levels are clamped to none

#514 — Web Remote did nothing:
three independent defects, so fixing one left the next one visible.
  - window.open ran inside a 300 ms timer, outside the user gesture, so
    Chrome blocked it silently; the window is now opened synchronously
  - the window was pointed at /remote/, the device picker, which never
    loads remote.js and so never consumed the queued session; it now
    navigates straight to /remote/<deviceId>, where the id is in the URL
    and no queue handoff is needed
  - an empty password + Connect returned without feedback; it now shows a
    localized hint and clears it on input
  - explicit width/height so the small-screen gate does not hide the viewer
  - new contract test locks in all three properties

New i18n keys (users.group_no_members_ceiling_hint,
remote.password_empty_hint) are translated in all 26 locales. Also fixes
the French user-group member count, which had German text.

Reported-by: @mh254

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-11-20 08:57:08 +01:00
..