Skip to content

Lightweight account management tool, ring session fixes, UI bug fixes#781

Draft
Copilot wants to merge 20 commits intocore4from
copilot/replace-ams-with-lightweight-tool
Draft

Lightweight account management tool, ring session fixes, UI bug fixes#781
Copilot wants to merge 20 commits intocore4from
copilot/replace-ams-with-lightweight-tool

Conversation

Copy link
Contributor

Copilot AI commented Feb 14, 2026

The existing AMS (Account Management System) is overly complex for basic account management needs. This adds a lightweight replacement at web/public_php/account/ that directly manages accounts in the nel database, shows domain/shard access, player characters, and ring session management through the RSM.

Also fixes the ring session browser PHP scripts (broken on PHP 7.0+) and a UI element lookup bug in help.xml.

New account management tool (web/public_php/account/)

  • Registration/Login — creates accounts directly in the nel user table with configurable default privileges and domain access
  • Home dashboard — domains, shards, permissions with parsed privilege badges
  • Characters — per-domain character list from ring database
  • Sessions — ring session management routed through RSM (Ring Session Manager) via binary socket protocol, not direct SQL. Filters out mainland shard entries. Invite by character name, view participants, remove participants, browse open sessions
  • Settings — change password, change email
  • Admin page — search users, edit privileges, manage permissions. Privilege hierarchy enforced (GM can't edit DEV, etc.)
  • Admin impersonation — "View as User" to see/manage the site as any lower-ranked user
  • Dev settings — configurable admin privilege list, default new-account privileges, default domain access. Stored in new setting table (nel_00006.sql migration)

Setup refactoring

  • Extracted shared config generation into setup/config_generation.php, used by install.php, upgrade.php, and new setup_cli.php
  • CLI setup tool (setup_cli.php) — install/upgrade commands with full CLI options, --dev flag for development shard setup

Bug fixes

  • help.xml — three hide handler procs passed target='ui:interface:X' but CAHUIHide::execute expects just the container name as params. Fixed to pass universe_chanel_warning, death_warning, night_warning directly
  • Ring PHP scripts — replaced all split() calls with explode() (split() removed in PHP 7.0)

AMS redirect

Config flag $AMS_REDIRECT_TO_ACCOUNT in config_user.php — when true, legacy AMS index.php redirects to ../account/. Defaults to false.

Screenshots

Sign In Home Characters
Sign In Home Characters
Sessions Settings Admin
Sessions Settings Admin
Dev Settings
Dev Settings

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 14, 2026 00:53
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove AMS and add lightweight account management tool Add lightweight account management tool and CLI setup Feb 14, 2026
Copilot AI requested a review from kaetemi February 14, 2026 01:04
…ssions card

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Add lightweight account management tool and CLI setup Add lightweight account management tool, CLI setup, and shared config generation Feb 14, 2026
…ticipants, browse open sessions

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Add lightweight account management tool, CLI setup, and shared config generation Add lightweight account management tool with Ring session support Feb 14, 2026
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Add lightweight account management tool with Ring session support Add lightweight account management web tool Feb 14, 2026
The hide action handler (CAHUIHide) expects just a container name
as its params, but the help.xml procedures were passing
target='ui:interface:X' syntax which the handler doesn't parse.
This caused getElementFromId to look up bogus IDs like
"target='ui:interface:universe_chanel_warning'" and fail.

Fixed three procedures: universe_chanel_warning_close,
death_warning_close, and night_warning_close.

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Add lightweight account management web tool Fix hide handler params in help.xml and add lightweight account management tool Feb 14, 2026
Replace split() with explode() in all ring PHP scripts. The split()
function was removed in PHP 7.0, causing the session browser backend
to be completely broken on modern PHP installations.

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Fix hide handler params in help.xml and add lightweight account management tool Add lightweight account management tool and fix ring session browser Feb 14, 2026
Session close, invite, and remove operations now strictly require the
Ring Session Manager to be available. When it's unreachable, users
see a clear error message instead of silently falling back to direct
SQL operations that bypass RSM's orchestration and permission checks.

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Add lightweight account management tool + fix ring session browser Lightweight account management tool, ring session browser fixes, UI XML fix Feb 14, 2026
Copilot AI changed the title Lightweight account management tool, ring session browser fixes, UI XML fix Lightweight account management tool, ring session browser fixes Feb 14, 2026
Copilot AI and others added 2 commits February 14, 2026 20:38
- Add hasPriv(), isAdmin(), parsePrivileges(), privilegeLabel() helpers
  matching the server-side colon-delimited privilege format (:DEV:GM:)
- Store user privilege in session on login
- Gate admin page behind :DEV:, :SGM:, or :GM: privilege check
- Admin page: search/list users, edit privileges, manage domain/shard
  permissions (add/remove)
- Home page: show parsed privilege badges with tooltips instead of raw
  privilege string

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
…LIKE wildcards

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Lightweight account management tool, ring session browser fixes Add lightweight account management tool and fix ring session browser Feb 14, 2026
Copilot AI and others added 2 commits February 14, 2026 20:51
…defaults

- Privilege rank system: DEV > SGM > EM > GM > EG > VG > SG > G > OBSERVER > PR
- Admin page: GM can't edit DEV/SGM, SGM can't edit DEV, can't assign
  privileges at or above own rank
- Dev settings page (DEV-only): configure admin privileges, settings
  privilege, default new account privileges, default domain access
- nel_00006.sql migration: nel_setting key/value table with defaults
- Registration uses configurable default privileges and domain access
- Settings stored in nel_setting table, queried via getSetting()/setSetting()

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
…fety

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Add lightweight account management tool and fix ring session browser Lightweight account management tool, ring session fixes, privilege system Feb 14, 2026
Admins can click "View as User" on the admin page to see the account
tool as that user sees it - their home page, characters, sessions,
and settings. This gives full practical management over all sessions
without needing separate admin-mode session management.

- Impersonation gated behind privilege hierarchy (can't impersonate
  equal or higher rank users)
- Yellow banner shown at top of every page during impersonation
- Admin/Dev pages blocked while impersonating
- "Exit View" returns to admin page with original identity restored
- Admin session preserved in impersonate_admin_* session variables

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Lightweight account management tool, ring session fixes, privilege system Add lightweight account management tool and fix ring session browser Feb 14, 2026
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Add lightweight account management tool and fix ring session browser Lightweight account management tool + ring session browser fixes Feb 14, 2026
When $AMS_REDIRECT_TO_ACCOUNT is set to true in config_user.php,
any access to the legacy AMS index.php will redirect to ../account/.
The flag defaults to false to preserve backward compatibility.

Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Copilot AI changed the title Lightweight account management tool + ring session browser fixes Lightweight account management tool, ring session fixes, UI bug fixes Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants