新增职务权限管理与聊天室管理权限控制
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
$levelFreeze = (int) \App\Models\Sysparam::getValue('level_freeze', '14');
|
||||
$superLevel = (int) \App\Models\Sysparam::getValue('superlevel', '100');
|
||||
$myLevel = Auth::user()->user_level;
|
||||
$positionPermissions = array_keys(array_filter($roomPermissionMap ?? []));
|
||||
@endphp
|
||||
<script>
|
||||
window.chatContext = {
|
||||
@@ -73,6 +74,9 @@
|
||||
chatBotEnabled: {{ $chatbotEnabledState ? 'true' : 'false' }},
|
||||
botUser: @json($botUserData),
|
||||
hasPosition: {{ Auth::user()->activePosition || Auth::user()->user_level >= $superLevel ? 'true' : 'false' }},
|
||||
hasRoomManagementPermission: {{ ! empty($hasRoomManagementPermission) ? 'true' : 'false' }},
|
||||
positionPermissions: @json($positionPermissions),
|
||||
positionPermissionMap: @json($roomPermissionMap ?? []),
|
||||
@php
|
||||
$activePos = Auth::user()->activePosition;
|
||||
$deptName = $activePos?->position?->department?->name ?? '';
|
||||
|
||||
Reference in New Issue
Block a user