This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 253
[4.x] Custom Middleware to contain auth features #207
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apply fixes from StyleCI
…l-editor into middleware-for-auth
ReeceM
commented
May 21, 2022
Comment on lines
+33
to
+37
if (method_exists($request->user(), 'manageMailables')) { | ||
$request->user()->manageMailables() ?: throw new UnauthorizedException(); | ||
} | ||
|
||
return $next($request); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should just fail if the method isn't defined? Or allow it to pass if the environment is allowed?
Fix/route errors
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) to 4.2.1 and updates ancestor dependency [browser-sync](https://github.com/BrowserSync/browser-sync). These dependencies need to be updated together. Updates `socket.io-parser` from 3.2.0 to 4.2.1 - [Release notes](https://github.com/socketio/socket.io-parser/releases) - [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md) - [Commits](socketio/socket.io-parser@3.2.0...4.2.1) Updates `browser-sync` from 2.26.3 to 2.27.10 - [Release notes](https://github.com/BrowserSync/browser-sync/releases) - [Changelog](https://github.com/BrowserSync/browser-sync/blob/master/CHANGELOG.md) - [Commits](BrowserSync/browser-sync@v2.26.3...v2.27.10) --- updated-dependencies: - dependency-name: socket.io-parser dependency-type: indirect - dependency-name: browser-sync dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]>
fix: compatible way to call the method on mailable
Bumps [engine.io](https://github.com/socketio/engine.io) to 6.2.1 and updates ancestor dependency [browser-sync](https://github.com/BrowserSync/browser-sync). These dependencies need to be updated together. Updates `engine.io` from 3.2.1 to 6.2.1 - [Release notes](https://github.com/socketio/engine.io/releases) - [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md) - [Commits](socketio/engine.io@3.2.1...6.2.1) Updates `browser-sync` from 2.26.3 to 2.27.10 - [Release notes](https://github.com/BrowserSync/browser-sync/releases) - [Changelog](https://github.com/BrowserSync/browser-sync/blob/master/CHANGELOG.md) - [Commits](BrowserSync/browser-sync@v2.26.3...v2.27.10) --- updated-dependencies: - dependency-name: engine.io dependency-type: indirect - dependency-name: browser-sync dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]>
…io-and-browser-sync-6.2.1 Bump engine.io and browser-sync
…io-parser-and-browser-sync-4.2.1 Bump socket.io-parser and browser-sync
Lines variable needs to be array and not integer for loadNamespaceOverrides method.
Apply fixes from StyleCI
Update the deps to use laravel 10
Any update ? |
@xicond is this something that you would like to use on the package? |
@ReeceM I want to avoid error on artisan route:list when environment not exists in config |
Hi There, I'll have a look tonight. Given some what the update for L10 as well I'll bundle the two together. |
…l-editor into middleware-for-auth
Apply fixes from StyleCI
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should help improve the management of Auth for the package when accessing details.
Description
The changes made is the creation of a new middleware called Authenticate. This is then added into the middleware config so it is loaded in the service provider.
It also adds the added functionality of having a method defined on the
User::class
model to have amanageMailables
method where a person can define if that specific user has access to the Mailable editor.It also has the change that it checks if the system is running in the console and then doesn't load up the environment check.
Related Issue
#184 #114
Motivation and Context
This adds a central place to manage the authentication for the MailEclipse package. It also allows users to override the functionality if need be.
Types of changes
Checklist: