1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

Linked new API token system into middleware

Base logic in place but needs review and refactor to see if can better
fit into Laravel using 'Guard' system. Currently has issues due to
cookies in use from active session on API.
This commit is contained in:
Dan Brown
2019-12-30 02:16:07 +00:00
parent 2cfa37399c
commit 3de55ee645
7 changed files with 183 additions and 37 deletions

View File

@@ -42,7 +42,6 @@ function user(): User
/**
* Check if current user is a signed in user.
* @return bool
*/
function signedInUser(): bool
{
@@ -51,7 +50,6 @@ function signedInUser(): bool
/**
* Check if the current user has general access.
* @return bool
*/
function hasAppAccess(): bool
{
@@ -62,9 +60,6 @@ function hasAppAccess(): bool
* Check if the current user has a permission.
* If an ownable element is passed in the jointPermissions are checked against
* that particular item.
* @param string $permission
* @param Ownable $ownable
* @return bool
*/
function userCan(string $permission, Ownable $ownable = null): bool
{