[PR #28] [MERGED] Use Laravel built-in authorization #1131

Closed
opened 2026-02-26 02:35:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/28
Author: @pedroborges
Created: 12/14/2015
Status: Merged
Merged: 12/15/2015
Merged by: @phanan

Base: masterHead: use-laravel-authorization


📝 Commits (6)

📊 Changes

12 files changed (+102 additions, -53 deletions)

View changed files

📝 app/Http/Controllers/API/Controller.php (+2 -0)
📝 app/Http/Controllers/API/PlaylistController.php (+11 -23)
📝 app/Http/Controllers/API/UserController.php (+8 -10)
📝 app/Http/Requests/API/UserUpdateRequest.php (+1 -1)
📝 app/Http/routes.php (+1 -1)
📝 app/Models/User.php (+1 -0)
app/Policies/PlaylistPolicy.php (+17 -0)
app/Policies/UserPolicy.php (+16 -0)
📝 app/Providers/AuthServiceProvider.php (+6 -1)
📝 app/Providers/RouteServiceProvider.php (+3 -2)
📝 tests/PlaylistTest.php (+22 -7)
📝 tests/UserTest.php (+14 -8)

📄 Description

The comment below motivated me to find a better solution for the
repeated authorisation checks:

// This can't be put into a Request authorize(), due to Laravel(?)'s limitation.

This is the result.


🔄 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/koel/koel/pull/28 **Author:** [@pedroborges](https://github.com/pedroborges) **Created:** 12/14/2015 **Status:** ✅ Merged **Merged:** 12/15/2015 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `use-laravel-authorization` --- ### 📝 Commits (6) - [`899c717`](https://github.com/koel/koel/commit/899c7176c1c140b9b0f78793b1ab760c01d21732) Use Laravel built-in authorization - [`d21736d`](https://github.com/koel/koel/commit/d21736d59d03c4c2c15c7ccdae5c1c318e8ed5b7) Fix conflicts - [`dab4486`](https://github.com/koel/koel/commit/dab4486eeeebed69bc294ae334c1efdb035bbda1) Fix after merge issues - [`8f34dad`](https://github.com/koel/koel/commit/8f34dad27d31d2e0ecd6e23f08fe8e34887be4ba) Satisfy StyleCI - [`5f9f7d9`](https://github.com/koel/koel/commit/5f9f7d925d9d03707eb85c3a68f32f1da46b6fed) Fix UserPolicy - [`830718f`](https://github.com/koel/koel/commit/830718f39620d8e2bd22a57c9471e386a27c0785) Update docblocks ### 📊 Changes **12 files changed** (+102 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Controllers/API/Controller.php` (+2 -0) 📝 `app/Http/Controllers/API/PlaylistController.php` (+11 -23) 📝 `app/Http/Controllers/API/UserController.php` (+8 -10) 📝 `app/Http/Requests/API/UserUpdateRequest.php` (+1 -1) 📝 `app/Http/routes.php` (+1 -1) 📝 `app/Models/User.php` (+1 -0) ➕ `app/Policies/PlaylistPolicy.php` (+17 -0) ➕ `app/Policies/UserPolicy.php` (+16 -0) 📝 `app/Providers/AuthServiceProvider.php` (+6 -1) 📝 `app/Providers/RouteServiceProvider.php` (+3 -2) 📝 `tests/PlaylistTest.php` (+22 -7) 📝 `tests/UserTest.php` (+14 -8) </details> ### 📄 Description The comment below motivated me to find a better solution for the repeated authorisation checks: ``` php // This can't be put into a Request authorize(), due to Laravel(?)'s limitation. ``` This is the result. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 02:35:33 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1131
No description provided.