[PR #1699] [MERGED] Prevent rootAdmins from having other roles & being deleted via the API #1525

Closed
opened 2026-02-05 18:16:27 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/1699
Author: @rmartinoscar
Created: 9/10/2025
Status: Merged
Merged: 9/11/2025
Merged by: @rmartinoscar

Base: mainHead: fix/rootAdminAPI


📝 Commits (2)

  • 9a718c0 Prevent rootAdmins from having other roles & being deleted via the API
  • caf553f Avoid calling Role::getRootAdmin() on each iteration

📊 Changes

2 files changed (+24 additions, -14 deletions)

View changed files

📝 app/Http/Controllers/Api/Application/Users/UserController.php (+22 -12)
📝 app/Http/Requests/Api/Application/Users/AssignUserRolesRequest.php (+2 -2)

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/panel/pull/1699 **Author:** [@rmartinoscar](https://github.com/rmartinoscar) **Created:** 9/10/2025 **Status:** ✅ Merged **Merged:** 9/11/2025 **Merged by:** [@rmartinoscar](https://github.com/rmartinoscar) **Base:** `main` ← **Head:** `fix/rootAdminAPI` --- ### 📝 Commits (2) - [`9a718c0`](https://github.com/pelican-dev/panel/commit/9a718c00047dce67a44239e38a745710f54eca75) Prevent rootAdmins from having other roles & being deleted via the API - [`caf553f`](https://github.com/pelican-dev/panel/commit/caf553fc0c546d070b4fff1283494786bd70e116) Avoid calling Role::getRootAdmin() on each iteration ### 📊 Changes **2 files changed** (+24 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Controllers/Api/Application/Users/UserController.php` (+22 -12) 📝 `app/Http/Requests/Api/Application/Users/AssignUserRolesRequest.php` (+2 -2) </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 18:16:27 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#1525