Skip to content

Fix: set custom_role_id on fresh install admin creation#7

Merged
ChesnoTech merged 1 commit intodevelopfrom
fix/admin-role-id-fresh-install
Mar 26, 2026
Merged

Fix: set custom_role_id on fresh install admin creation#7
ChesnoTech merged 1 commit intodevelopfrom
fix/admin-role-id-fresh-install

Conversation

@ChesnoTech
Copy link
Copy Markdown
Owner

Summary

  • Admin user created on fresh install had custom_role_id = NULL
  • ACL system needs this to resolve permissions → all permissions were false
  • Now queries acl_roles for the super_admin role ID and sets it

Branch Type

  • fix/ — Bug fix (→ develop)

Components Affected

  • Database (create_admin.php)

Testing Checklist

  • Fresh Docker stack with clean DB
  • All 26 migrations run
  • Admin login returns all permissions = true
  • All 24 pages render without errors

On fresh installs, create_admin.php created the admin user with
custom_role_id = NULL. The ACL system uses custom_role_id to look up
the role in acl_roles, so NULL meant zero permissions even for
super_admin. Now queries acl_roles for the super_admin role ID and
sets it during user creation.

Found during full visual test of all 24 admin pages on a fresh
Docker stack with clean database.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ChesnoTech ChesnoTech merged commit 5e4fec7 into develop Mar 26, 2026
4 checks passed
@ChesnoTech ChesnoTech deleted the fix/admin-role-id-fresh-install branch March 26, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant