Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Middleware class with Gate functionality definable #114

Closed
ReeceM opened this issue Sep 27, 2020 · 0 comments
Closed

Middleware class with Gate functionality definable #114

ReeceM opened this issue Sep 27, 2020 · 0 comments
Labels
enhancement New feature or request Feature Feature request / feature being added via PR good first issue A good issue to get your feet wet v5 version 5, supports both API and self hosted

Comments

@ReeceM
Copy link
Collaborator

ReeceM commented Sep 27, 2020

Description

It would be useful to have a middleware that is dedicated to the MailEclipse editor, instead of defining it in the controllers constructor. Currently if it is updated, you have to make sure it is updated in both controllers and also any future controllers.

It might not be clear to an end user where the actual auth logic is coming in.

Describe the solution you'd like
It would mean that there can be a definition in the middleware to check the environment setting as well as a custom Gate policy if the user defines it to limit the number of users who actually have access.

A user can then define a Gate policy in an extended ServiceProvider class that can be published with the stub of the policy in there.

Or the callback can be placed in via the MailEclipse facade. (Adjustment and improvement to this in future versions)

The Middleware would be defined in the same pattern as a normal middleware. The logic for authentication is then moved from the controllers to a central place. The middleware would be defined in the config file e.g.: \Qoraiche\MailEclipse\Http\Middleware\MailEclipse::class,

@ReeceM ReeceM added enhancement New feature or request Feature Feature request / feature being added via PR Hacktoberfest labels Sep 27, 2020
@ReeceM ReeceM added this to To do in Hacktoberfest Sep 27, 2020
@ReeceM ReeceM added this to the New Features and updates milestone Mar 9, 2021
@ReeceM ReeceM added the good first issue A good issue to get your feet wet label Jun 21, 2021
@ReeceM ReeceM added this to Low priority in Bug Tracking Jun 25, 2021
@Qoraiche Qoraiche moved this from Low priority to Needs triage in Bug Tracking Aug 2, 2023
@Qoraiche Qoraiche added the v5 version 5, supports both API and self hosted label Aug 2, 2023
@Qoraiche Qoraiche closed this as completed Jun 3, 2024
Bug Tracking automation moved this from Needs triage to Closed Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Feature Feature request / feature being added via PR good first issue A good issue to get your feet wet v5 version 5, supports both API and self hosted
Projects
Bug Tracking
  
Closed
Hacktoberfest
  
To do
Development

No branches or pull requests

2 participants