将用户管理操作接入职务权限体系
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
$superLevel = (int) \App\Models\Sysparam::getValue('superlevel', '100');
|
||||
$myLevel = Auth::user()->user_level;
|
||||
$positionPermissions = array_keys(array_filter($roomPermissionMap ?? []));
|
||||
$operatorActivePosition = Auth::user()->activePosition?->load('position.department')->position;
|
||||
$operatorDepartmentRank = (int) ($operatorActivePosition?->department?->rank ?? 0);
|
||||
$operatorPositionRank = (int) ($operatorActivePosition?->rank ?? 0);
|
||||
@endphp
|
||||
<script>
|
||||
window.chatContext = {
|
||||
@@ -84,6 +87,8 @@
|
||||
$posName = $activePos?->position?->name ?? '';
|
||||
@endphp
|
||||
welcomePrefix: "{{ $deptName ? "{$deptName} {$posName} {$user->username}" : $user->username }}",
|
||||
operatorDepartmentRank: {{ $operatorDepartmentRank }},
|
||||
operatorPositionRank: {{ $operatorPositionRank }},
|
||||
myMaxReward: @php
|
||||
if (Auth::id() === 1) {
|
||||
// 超级管理员(id=1)无需职务,直接拥有不限量奖励权
|
||||
|
||||
Reference in New Issue
Block a user