From 2be631255c156c0727ca5afc75609a0fa7a2d6b3 Mon Sep 17 00:00:00 2001 From: chengxl Date: Wed, 27 Aug 2025 14:22:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=A7=92=E8=89=B2=E6=96=B0?= =?UTF-8?q?=E5=A2=9E[=E4=B8=BB=E7=BC=96/=E5=89=AF=E4=B8=BB=E7=BC=96/?= =?UTF-8?q?=E7=BC=96=E5=A7=94]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/User.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/application/api/controller/User.php b/application/api/controller/User.php index e953963..92485b2 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -1957,6 +1957,19 @@ class User extends Base $board_res = $this->board_to_journal_obj->where('user_id', $user_info['user_id'])->where('state', 0)->find(); if ($board_res != null) { $roles[] = 'board'; + + //判断用户角色 0主编1副主编2编委成员 chengxiaoling 20250827 start + $iType = isset($board_res['type']) ? $board_res['type'] : '-1'; + if($iType == 0){ + $roles[] = 'chief_editor'; + } + if($iType == 1){ + $roles[] = 'deputy_editor'; + } + if($iType == 2){ + $roles[] = 'editor_board'; + } + //判断用户角色 0主编1副主编2编委成员 chengxiaoling 20250827 end } $special_res = $this->user_to_special_obj->where('user_id', $user_info['user_id'])->where("uts_state", 0)->find(); if ($special_res != null) {