Skip to content

refactor(auth): consolidate permissions to 15 unified modules and drop dead node freeze code - #463

Merged
trtajim merged 1 commit into
mainfrom
refactor/consolidate-permissions
Oct 26, 2026
Merged

trtajim merged 1 commit into
mainfrom
refactor/consolidate-permissions

Conversation

@trtajim

@trtajim trtajim commented Oct 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Permission Consolidation: Reduced 27 fragmented permissions to 15 clean, intention-aligned permissions via migration 2026_10_26_160500_consolidate_permissions.php:
    • manage curriculum: Consolidates create subjects, edit subjects, delete subjects, create nodes, edit nodes, delete nodes.
    • manage resources: Consolidates edit resources, delete resources (direct editing of any note & permanent deletions).
    • manage users: Consolidates create users, edit users, delete users.
    • manage settings: Consolidates manage platform settings, edit notice, manage peers, clear cache.
  • Explicit Separations Preserved:
    • moderate resources remains standalone for review queue, approving/rejecting notes, and comment moderation.
    • view users remains standalone for read-only user directory browsing and searching.
    • impersonate users remains standalone for security-critical login-as capability.
  • Dead Code Dropped:
    • Deleted obsolete freeze nodes permission, along with toggleFreeze() in AdminNodeController, route in routes/admin.php, and unused button in NodeHeader.vue / Node.vue.
    • Preserved GET /api/auth/status in routes/web.php for external app consumers.
  • Synced Seeder & Admin Role: Updated RolePermissionSeeder.php so fresh installations and testing suites mirror the exact 15-permission schema.

Verification

  • Passed npm run format:check
  • Passed composer lint (Laravel Pint)
  • Passed npm run lint (ESLint)
  • Passed php artisan test (303 tests, 1,613 assertions)

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@trtajim
trtajim merged commit cef09c7 into main Oct 26, 2026
5 of 6 checks passed
@trtajim
trtajim deleted the refactor/consolidate-permissions branch October 26, 2026 10:17
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