[PR #361] [MERGED] Refactor api key permissions #712

Closed
opened 2026-02-04 18:45:06 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/361
Author: @Boy132
Created: 6/10/2024
Status: Merged
Merged: 11/6/2024
Merged by: @Boy132

Base: mainHead: api-revamp/permissions


📝 Commits (10+)

  • 58d172d use RESOURCE_NAME for requests
  • abaab2e use RESOURCE_NAME for transformers
  • 3bf142c add permissions field to api key
  • f6a229c add migration for new permissions field
  • df7cd60 update tests
  • ede3a57 remove debug log
  • 8e208c9 set column type to "json"
  • 2c05a6e remove default attribute to fix tests
  • 19c6545 fix default value for permissions
  • 897af7b Merge branch 'pelican-dev:main' into api-revamp/permissions

📊 Changes

60 files changed (+453 additions, -321 deletions)

View changed files

📝 app/Filament/Resources/ApiKeyResource/Pages/CreateApiKey.php (+18 -1)
📝 app/Http/Requests/Admin/Api/StoreApplicationApiKeyRequest.php (+9 -7)
📝 app/Http/Requests/Api/Application/Allocations/DeleteAllocationRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Allocations/GetAllocationsRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Allocations/StoreAllocationRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/DatabaseHosts/DeleteDatabaseHostRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/DatabaseHosts/GetDatabaseHostRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/DatabaseHosts/StoreDatabaseHostRequest.php (+1 -1)
📝 app/Http/Requests/Api/Application/Eggs/GetEggRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Eggs/GetEggsRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Mounts/DeleteMountRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Mounts/GetMountRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Mounts/StoreMountRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Nodes/DeleteNodeRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Nodes/GetNodesRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php (+1 -1)
📝 app/Http/Requests/Api/Application/Roles/DeleteRoleRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Roles/GetRoleRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Roles/StoreRoleRequest.php (+2 -1)
📝 app/Http/Requests/Api/Application/Servers/Databases/GetServerDatabaseRequest.php (+2 -1)

...and 40 more files

📄 Description

Removes all r_ columns for api key permissions and replaces these with a single array permissions.
Needed for plugins later.

This does not handle #193 as it's only api key permissions.


🔄 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/361 **Author:** [@Boy132](https://github.com/Boy132) **Created:** 6/10/2024 **Status:** ✅ Merged **Merged:** 11/6/2024 **Merged by:** [@Boy132](https://github.com/Boy132) **Base:** `main` ← **Head:** `api-revamp/permissions` --- ### 📝 Commits (10+) - [`58d172d`](https://github.com/pelican-dev/panel/commit/58d172d22432619eb90edc4345ea460e33a957c5) use RESOURCE_NAME for requests - [`abaab2e`](https://github.com/pelican-dev/panel/commit/abaab2e01635325de227aa461014567480b2fa26) use RESOURCE_NAME for transformers - [`3bf142c`](https://github.com/pelican-dev/panel/commit/3bf142c941d51a423090ca37dfdeda8c23263f93) add permissions field to api key - [`f6a229c`](https://github.com/pelican-dev/panel/commit/f6a229c46eec0d88d3ad4719abc5438ebf6a37b6) add migration for new permissions field - [`df7cd60`](https://github.com/pelican-dev/panel/commit/df7cd60372f80c8bfdc2c8e286e7d6916d234493) update tests - [`ede3a57`](https://github.com/pelican-dev/panel/commit/ede3a576cbbbd8c610271a4fe1e09a1c5c452805) remove debug log - [`8e208c9`](https://github.com/pelican-dev/panel/commit/8e208c939c1f8cc30317757873e4a65966f57aa3) set column type to "json" - [`2c05a6e`](https://github.com/pelican-dev/panel/commit/2c05a6e9682b869b4316af146112a6d5e9800d68) remove default attribute to fix tests - [`19c6545`](https://github.com/pelican-dev/panel/commit/19c6545ae6803acc5bffb576312101e63d472447) fix default value for permissions - [`897af7b`](https://github.com/pelican-dev/panel/commit/897af7b0a0820c63f6af9cc98512e622344d0622) Merge branch 'pelican-dev:main' into api-revamp/permissions ### 📊 Changes **60 files changed** (+453 additions, -321 deletions) <details> <summary>View changed files</summary> 📝 `app/Filament/Resources/ApiKeyResource/Pages/CreateApiKey.php` (+18 -1) 📝 `app/Http/Requests/Admin/Api/StoreApplicationApiKeyRequest.php` (+9 -7) 📝 `app/Http/Requests/Api/Application/Allocations/DeleteAllocationRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Allocations/GetAllocationsRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Allocations/StoreAllocationRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/DatabaseHosts/DeleteDatabaseHostRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/DatabaseHosts/GetDatabaseHostRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/DatabaseHosts/StoreDatabaseHostRequest.php` (+1 -1) 📝 `app/Http/Requests/Api/Application/Eggs/GetEggRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Eggs/GetEggsRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Mounts/DeleteMountRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Mounts/GetMountRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Mounts/StoreMountRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Nodes/DeleteNodeRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Nodes/GetNodesRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php` (+1 -1) 📝 `app/Http/Requests/Api/Application/Roles/DeleteRoleRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Roles/GetRoleRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Roles/StoreRoleRequest.php` (+2 -1) 📝 `app/Http/Requests/Api/Application/Servers/Databases/GetServerDatabaseRequest.php` (+2 -1) _...and 40 more files_ </details> ### 📄 Description Removes all `r_` columns for api key permissions and replaces these with a single array `permissions`. Needed for plugins later. This does _not_ handle #193 as it's only api key permissions. --- <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-04 18:45:06 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel#712