[PR #611] [MERGED] Update API for roles #852

Closed
opened 2026-02-05 17:56:33 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/611
Author: @Boy132
Created: 10/7/2024
Status: Merged
Merged: 10/9/2024
Merged by: @Boy132

Base: mainHead: update/roles-api


📝 Commits (5)

  • 4885b83 remove guard_name from api and add id to transformer
  • 87b3a6a disallow update/ delete for root admin role via api
  • e7c0243 disallow assigning root admin via api
  • d0b1d1f add api to remove user roles
  • d828bbf fix assignRoles & removeRoles

📊 Changes

7 files changed (+43 additions, -9 deletions)

View changed files

📝 app/Http/Controllers/Api/Application/Roles/RoleController.php (+11 -2)
📝 app/Http/Controllers/Api/Application/Users/UserController.php (+28 -2)
📝 app/Http/Requests/Api/Application/Roles/StoreRoleRequest.php (+0 -1)
📝 app/Http/Requests/Api/Application/Users/AssignUserRolesRequest.php (+1 -1)
📝 app/Transformers/Api/Application/RolePermissionTransformer.php (+0 -1)
📝 app/Transformers/Api/Application/RoleTransformer.php (+1 -1)
📝 routes/api-application.php (+2 -1)

📄 Description

  • Makes sure you can't update/ delete/ assign the Root Admin role.
  • Removes guard_name from role transformer.
  • Adds id to role transformer.
  • Adds endpoint to remove user roles.

🔄 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/611 **Author:** [@Boy132](https://github.com/Boy132) **Created:** 10/7/2024 **Status:** ✅ Merged **Merged:** 10/9/2024 **Merged by:** [@Boy132](https://github.com/Boy132) **Base:** `main` ← **Head:** `update/roles-api` --- ### 📝 Commits (5) - [`4885b83`](https://github.com/pelican-dev/panel/commit/4885b836bafedd059b79d3880987743dfa0bea38) remove `guard_name` from api and add id to transformer - [`87b3a6a`](https://github.com/pelican-dev/panel/commit/87b3a6a19ee56d44e0b574a2e7666c8779ddfd4f) disallow update/ delete for root admin role via api - [`e7c0243`](https://github.com/pelican-dev/panel/commit/e7c02435bac6d76bd83692432110d7796acfefc3) disallow assigning root admin via api - [`d0b1d1f`](https://github.com/pelican-dev/panel/commit/d0b1d1f2b79d769b15bb8a52d6c9eeeee3449958) add api to remove user roles - [`d828bbf`](https://github.com/pelican-dev/panel/commit/d828bbfb29b64f717a52ee3de391e7ade611c395) fix assignRoles & removeRoles ### 📊 Changes **7 files changed** (+43 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Controllers/Api/Application/Roles/RoleController.php` (+11 -2) 📝 `app/Http/Controllers/Api/Application/Users/UserController.php` (+28 -2) 📝 `app/Http/Requests/Api/Application/Roles/StoreRoleRequest.php` (+0 -1) 📝 `app/Http/Requests/Api/Application/Users/AssignUserRolesRequest.php` (+1 -1) 📝 `app/Transformers/Api/Application/RolePermissionTransformer.php` (+0 -1) 📝 `app/Transformers/Api/Application/RoleTransformer.php` (+1 -1) 📝 `routes/api-application.php` (+2 -1) </details> ### 📄 Description - Makes sure you can't update/ delete/ assign the `Root Admin` role. - Removes `guard_name` from role transformer. - Adds `id` to role transformer. - Adds endpoint to remove user roles. --- <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 17:56:33 +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#852