mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-21 05:48:41 +00:00
change from org to unit
This commit is contained in:
parent
65b455f6c0
commit
de4f390344
|
|
@ -75,7 +75,7 @@ interface RouterInterface
|
|||
* @param string $csrf CSRF token
|
||||
* @param int $verb Route verb
|
||||
* @param string $app Application name
|
||||
* @param int $orgId Organization id
|
||||
* @param int $unitId Organization id
|
||||
* @param Account $account Account
|
||||
* @param array $data Data
|
||||
*
|
||||
|
|
@ -88,7 +88,7 @@ interface RouterInterface
|
|||
string $csrf = null,
|
||||
int $verb = RouteVerb::GET,
|
||||
string $app = null,
|
||||
int $orgId = null,
|
||||
int $unitId = null,
|
||||
Account $account = null,
|
||||
array $data = null
|
||||
) : array;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ final class SocketRouter implements RouterInterface
|
|||
string $csrf = null,
|
||||
int $verb = RouteVerb::GET,
|
||||
string $app = null,
|
||||
int $orgId = null,
|
||||
int $unitId = null,
|
||||
Account $account = null,
|
||||
array $data = null
|
||||
) : array
|
||||
|
|
@ -143,7 +143,7 @@ final class SocketRouter implements RouterInterface
|
|||
} elseif (isset($d['permission']) && !empty($d['permission'])
|
||||
&& !($account?->hasPermission(
|
||||
$d['permission']['type'] ?? 0,
|
||||
$d['permission']['unit'] ?? $orgId,
|
||||
$d['permission']['unit'] ?? $unitId,
|
||||
$app,
|
||||
$d['permission']['module'] ?? null,
|
||||
$d['permission']['category'] ?? null
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ final class WebRouter implements RouterInterface
|
|||
string $csrf = null,
|
||||
int $verb = RouteVerb::GET,
|
||||
string $app = null,
|
||||
int $orgId = null,
|
||||
int $unitId = null,
|
||||
Account $account = null,
|
||||
array $data = null
|
||||
) : array
|
||||
|
|
@ -145,7 +145,7 @@ final class WebRouter implements RouterInterface
|
|||
} elseif (isset($d['permission']) && !empty($d['permission'])
|
||||
&& !($account?->hasPermission(
|
||||
$d['permission']['type'] ?? 0,
|
||||
$d['permission']['unit'] ?? $orgId,
|
||||
$d['permission']['unit'] ?? $unitId,
|
||||
$app,
|
||||
$d['permission']['module'] ?? null,
|
||||
$d['permission']['category'] ?? null
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user