v0.11.1 - Fixed roles and permissions

This commit is contained in:
frederikpyt
2020-09-02 11:40:36 +02:00
parent d7bfdaebf6
commit 4a64d49902
7 changed files with 74 additions and 82 deletions
@@ -22,7 +22,7 @@ class UserController extends Controller
{
public function __construct()
{
$this->middleware([ "auth" ])->only("logout");
$this->middleware([ "auth" ])->only(["accountupdate", "accountedit", "accounteditpass", "account", "logout"]);
$this->middleware([ "guest" ])->only("login");
$this->middleware([ "lang" ])->except(["login", "showLogin", "showForgot", "forgot"]);
@@ -31,8 +31,6 @@ class UserController extends Controller
$this->middleware([ "check.auth:user.create" ])->only("create");
$this->middleware([ "check.auth:user.edit" ])->only(["edit", "update"]);
$this->middleware([ "check.auth:user.delete" ])->only("delete");
$this->middleware([ "check.auth:ownuser.edit" ])->only(["accountupdate", "accountedit", "accounteditpass", "account"]);
}
/**
@@ -12,6 +12,8 @@ class UserEventController extends Controller
{
$this->middleware(["auth"]);
$this->middleware(["lang"]);
$this->middleware([ "check.auth:userevent.create" ])->only("create");
$this->middleware([ "check.auth:userevent.delete" ])->only("destroy");
}
/**
* Update the specified resource in storage.