You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abstract class of Policy, or just interface to make Policy object
can middleware, its like Gate.authorize but via middleware
Also we need AuthServiceProvider can register policies like this
importPostfrom"../app/Models/Post";import{ServiceProvider}from"@lunoxjs/core";classAuthServiceProviderextendsServiceProvider{/** * The policy mappings for the application. */protectedpolicies: [Class<any>,typeofPolicy][]=[[Post,PostPolicy],// are we can do this in typescript?];/** * Register any application authentication / authorization services. */publicfunctionboot(): void{// ...}}
The text was updated successfully, but these errors were encountered:
In laravel, we can use gate and policy to handle authorization. See
https://laravel.com/docs/10.x/authorization#introduction
But maybe we can start from simple version
can
middleware, its like Gate.authorize but via middlewareAlso we need AuthServiceProvider can register policies like this
The text was updated successfully, but these errors were encountered: