From 0b988a4b99d4282216f4b06416836744d0d8cb70 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Tue, 8 Sep 2026 11:29:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9C=AA=E9=85=8D=E7=BD=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=9A=84=E9=92=89=E9=92=89=E7=94=A8=E6=88=B7=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=98=BE=E7=A4=BA=E5=AE=8C=E6=95=B4=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=20(#117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utilities/SidebarPermissions.php | 3 --- docs/钉钉花名册登录.md | 2 +- tests/Feature/Auth/DingTalkLoginTest.php | 23 +++++++++++++++++------ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/app/Utilities/SidebarPermissions.php b/app/Utilities/SidebarPermissions.php index 2738c115..0c36a020 100644 --- a/app/Utilities/SidebarPermissions.php +++ b/app/Utilities/SidebarPermissions.php @@ -35,9 +35,6 @@ class SidebarPermissions $subject = self::subjectKey($user); if (! in_array($subject, $settings['configured'] ?? [], true)) { - if ($user->created_from === 'dingtalk_roster' && SystemAccess::roleName($user) === SystemAccess::USER) { - return []; - } return null; } diff --git a/docs/钉钉花名册登录.md b/docs/钉钉花名册登录.md index 18b201c3..6a94f5ff 100644 --- a/docs/钉钉花名册登录.md +++ b/docs/钉钉花名册登录.md @@ -15,7 +15,7 @@ 新账号使用钉钉接口返回的姓名、可用邮箱和手机号;邮箱缺失或已被其他账号使用时,生成稳定的 `@dingtalk.invalid` 内部占位地址。系统生成不可预知的随机本地密码,不展示或发送密码,不发送注册邀请。花名册显示名仅作为姓名缺失时的后备。 -新账号赋予现有 `user` 角色及进入应用外壳所需的 `read-admin-panel` 权限,不添加管理权限。业务访问继承管理员明确配置的普通用户权限;尚无配置时默认无业务权限,进入“你已登录,等待分配业务权限”的工作台。管理员可在“侧边栏管理”中为普通用户角色或指定账号配置业务范围。 +新账号赋予现有 `user` 角色及进入应用外壳所需的 `read-admin-panel` 权限,不添加管理权限。按负责人最新要求,尚无页面权限配置时默认显示完整业务导航;主管理员随后可在“侧边栏管理”中设置指定用户的业务范围。配置优先级为指定用户、角色、默认完整导航;显式配置为空时没有业务页面,不回退到完整导航。管理员专属操作(包括店铺密码读取)继续单独鉴权。 ## 只读数据契约 diff --git a/tests/Feature/Auth/DingTalkLoginTest.php b/tests/Feature/Auth/DingTalkLoginTest.php index 0a6bbc8b..5a50b178 100644 --- a/tests/Feature/Auth/DingTalkLoginTest.php +++ b/tests/Feature/Auth/DingTalkLoginTest.php @@ -111,7 +111,8 @@ class DingTalkLoginTest extends FeatureTestCase $this->assertNotSame($this->user->id, $created->id); $this->assertTrue($created->hasRole('user')); $this->assertFalse($created->hasRole('super_admin')); - $this->assertSame([], SidebarPermissions::allowedKeys($created)); + $this->assertNull(SidebarPermissions::allowedKeys($created)); + $this->assertTrue(collect(SidebarPermissions::navigationFor($created))->contains('slug', 'store-management')); $this->assertDatabaseHas('dingtalk_identities', [ 'user_id' => $created->id, 'union_id' => 'union-auto', @@ -127,8 +128,7 @@ class DingTalkLoginTest extends FeatureTestCase 'outcome' => 'success', 'user_id' => $created->id, ]); - $this->get(route('dashboard', ['company_id' => $this->company->id]))->assertOk() - ->assertSeeText('你已登录')->assertSeeText('无需再次注册'); + $this->get(route('dashboard', ['company_id' => $this->company->id]))->assertRedirectContains('/workspace/'); } public function test_shared_mobile_does_not_claim_an_existing_account(): void @@ -430,14 +430,13 @@ class DingTalkLoginTest extends FeatureTestCase public function test_admin_can_assign_business_access_to_the_automatically_created_user(): void { + app('url')->defaults(['company_id' => $this->company->id]); Http::preventStrayRequests(); Http::fake($this->dingtalkResponses('union-grant', 'open-grant')); $state = $this->startAuthorization(); $this->get(route('login.dingtalk.callback', ['code' => 'fake-code', 'state' => $state])); $created = auth()->user(); - $this->withExceptionHandling()->get(route('business.pages.show', [ - 'company_id' => $this->company->id, 'section' => 'store-management', 'page' => 'basic-information', - ]))->assertForbidden(); + $this->assertNull(SidebarPermissions::allowedKeys($created)); auth()->logout(); session()->invalidate(); $this->actingAs($this->user)->get(route('system-settings.sidebar.edit', ['subject' => 'user_'.$created->id])) ->assertOk()->assertSee('value="user_'.$created->id.'"', false); @@ -447,6 +446,18 @@ class DingTalkLoginTest extends FeatureTestCase $this->assertSame(['store-management/basic-information'], SidebarPermissions::allowedKeys($created)); $this->actingAs($created)->withSession(['dingtalk_identity_id' => $created->dingtalkIdentity->id, 'dingtalk_roster_checked_at' => now()->timestamp]) ->get(route('dashboard'))->assertRedirectContains('/workspace/store-management/basic-information'); + $this->withExceptionHandling()->get(route('business.pages.show', [ + 'company_id' => $this->company->id, 'section' => 'company-management', 'page' => 'basic-information', + ]))->assertForbidden(); + } + + public function test_explicit_empty_user_scope_does_not_fall_back_to_all_pages(): void + { + setting()->set('system.sidebar_permissions', [ + 'configured' => ['user_'.$this->user->id], 'subjects' => ['user_'.$this->user->id => []], + ]); + $this->assertSame([], SidebarPermissions::navigationFor($this->user)); + $this->loginAs()->get(route('dashboard', ['company_id' => $this->company->id]))->assertOk()->assertSeeText('尚未分配业务权限'); } protected function startAuthorization(): string From 8dc9f3bc6f7ae828670358dd142da4ca6366d9a3 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Tue, 8 Sep 2026 11:41:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E5=BA=97=E9=93=BA=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=AF=86=E7=A0=81=E9=A1=B5=E6=98=BE=E7=A4=BA=E7=9C=9F?= =?UTF-8?q?=E5=AE=9E=E7=BB=91=E5=AE=9A=E6=89=8B=E6=9C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 「绑定手机号」字段取消 secret 遮蔽,页面与导出均显示镜像中的真实手机号 - 更新 StoreAccountMirrorRepositoryTest 与 PrototypePageTest 覆盖新行为 - 密码配置状态列已由 #116 完成,本提交不重复改动 --- config/business_navigation.php | 2 +- tests/Feature/Business/PrototypePageTest.php | 5 +++-- .../EcommerceFinance/StoreAccountMirrorRepositoryTest.php | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/config/business_navigation.php b/config/business_navigation.php index 5663fc9a..91836de0 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -254,7 +254,7 @@ return [ ['name' => 'account_type', 'label' => '账号类型'], ['name' => 'account', 'label' => '账号'], ['name' => 'password_configured', 'label' => '密码', 'kind' => 'secret_status'], - ['name' => 'bound_phone', 'label' => '绑定手机号', 'kind' => 'secret'], + ['name' => 'bound_phone', 'label' => '绑定手机号'], ['name' => 'verification_contact', 'label' => '手机号验证码对接人'], ['name' => 'account_group_name', 'label' => '账号分组名称'], ['name' => 'created_at', 'label' => '店铺创建时间', 'kind' => 'date'], diff --git a/tests/Feature/Business/PrototypePageTest.php b/tests/Feature/Business/PrototypePageTest.php index 8acfd614..8aa36544 100644 --- a/tests/Feature/Business/PrototypePageTest.php +++ b/tests/Feature/Business/PrototypePageTest.php @@ -21,7 +21,7 @@ class PrototypePageTest extends FeatureTestCase 'profit_center' => '测试利润中心', 'account_type' => '主账号', 'account' => 'test-account', - 'password_configured' => null, + 'password_configured' => true, 'bound_phone' => '13800000000', 'verification_contact' => '测试对接人', 'account_group_name' => '测试分组', @@ -44,7 +44,8 @@ class PrototypePageTest extends FeatureTestCase ->assertSeeText('共 958 条') ->assertSeeText('已从共享业务镜像读取 958 条数据') ->assertSeeText('主账号') - ->assertSeeText('状态未同步') + ->assertSeeText('已设置') + ->assertSeeText('13800000000') ->assertDontSeeText('MAIN') ->assertDontSeeText('共享镜像中暂未读取到店铺账号数据'); } diff --git a/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php b/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php index 7a4b0eab..77cb72d7 100644 --- a/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php +++ b/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php @@ -46,6 +46,7 @@ class StoreAccountMirrorRepositoryTest extends TestCase foreach (['storeName', 'operationOwner', 'operationDepartmentHead', 'operationDirector', 'profitCenter', 'accountType', 'account', 'boundPhone', 'verificationContact', 'accountGroupName', 'createdAt', 'updatedAt'] as $column) { $table->string($column)->nullable(); } + $table->boolean('passwordConfigured')->nullable(); }); DB::connection('business_mirror')->table('business_mirror_table_states')->insert([ 'dataset_key' => StoreAccountMirrorRepository::DATASET, @@ -66,6 +67,7 @@ class StoreAccountMirrorRepositoryTest extends TestCase 'storeName' => '测试店铺', 'accountType' => $type, 'account' => 'test-account', + 'passwordConfigured' => $type === 'MAIN' ? true : ($type === 'SUB' ? false : null), ]); } @@ -74,6 +76,8 @@ class StoreAccountMirrorRepositoryTest extends TestCase $this->assertSame('主账号', $rows['account-' . md5('MAIN')]['account_type']); $this->assertSame('子账号', $rows['account-' . md5('SUB')]['account_type']); $this->assertNull($rows['account-' . md5('/')]['account_type']); - $this->assertNull($rows['account-' . md5('MAIN')]['password_configured']); + $this->assertTrue($rows['account-' . md5('MAIN')]['password_configured']); + $this->assertFalse($rows['account-' . md5('SUB')]['password_configured']); + $this->assertNull($rows['account-' . md5('/')]['password_configured']); } } From e94d556125e9cbe00ddbdcac598be399c212b692 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Tue, 8 Sep 2026 12:02:22 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=B8=8E=E7=AE=A1=E7=90=86=E5=91=98=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE=20(#119)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Settings/Navigation.php | 2 +- .../Controllers/SystemSettings/Sidebar.php | 11 +- app/Http/Controllers/SystemSettings/Users.php | 23 +-- app/Http/Livewire/Menu/Settings.php | 4 +- app/Http/Requests/Auth/User.php | 24 +++ app/Listeners/Menu/ShowInSettings.php | 2 +- app/Utilities/SidebarPermissions.php | 14 +- app/Utilities/SystemAccess.php | 13 +- .../partials/navigation-script.blade.php | 74 +++++++++ .../partials/navigation.blade.php | 12 +- .../system_settings/partials/styles.blade.php | 15 ++ .../system_settings/sidebar/edit.blade.php | 31 ++-- .../system_settings/sidebar/index.blade.php | 19 +++ .../system_settings/users/form.blade.php | 23 +-- .../system_settings/users/index.blade.php | 24 +-- routes/admin.php | 1 + tests/Feature/Auth/DingTalkLoginTest.php | 3 +- .../Business/AgreementSigningPageTest.php | 1 + .../CourierQuoteChangeWorkflowTest.php | 1 + tests/Feature/Business/ManagementCrudTest.php | 1 + .../Business/NonJingxiRefundPageTest.php | 1 + .../Business/ProductCatalogPageTest.php | 2 + tests/Feature/Business/PrototypePageTest.php | 1 + .../Business/QuoteManagementPageTest.php | 1 + .../SmallPaymentWorkOrderPageTest.php | 1 + .../Business/StoreAccountPasswordsTest.php | 1 + .../Business/SupplierPayablePagesTest.php | 1 + .../SystemSettings/UserPermissionsTest.php | 144 ++++++++++++++++++ 28 files changed, 383 insertions(+), 67 deletions(-) create mode 100644 resources/views/system_settings/partials/navigation-script.blade.php create mode 100644 resources/views/system_settings/partials/styles.blade.php create mode 100644 resources/views/system_settings/sidebar/index.blade.php create mode 100644 tests/Feature/SystemSettings/UserPermissionsTest.php diff --git a/app/Http/Controllers/Settings/Navigation.php b/app/Http/Controllers/Settings/Navigation.php index 28c1f269..2ded2fc8 100644 --- a/app/Http/Controllers/Settings/Navigation.php +++ b/app/Http/Controllers/Settings/Navigation.php @@ -13,7 +13,7 @@ class Navigation extends Controller parent::__construct(); $this->middleware(function ($request, $next) { - abort_unless(user()?->hasRole('admin'), 403); + abort_unless(\App\Utilities\SystemAccess::canOpenSettings(), 403); return $next($request); }); diff --git a/app/Http/Controllers/SystemSettings/Sidebar.php b/app/Http/Controllers/SystemSettings/Sidebar.php index 68328ebd..819180e6 100644 --- a/app/Http/Controllers/SystemSettings/Sidebar.php +++ b/app/Http/Controllers/SystemSettings/Sidebar.php @@ -21,6 +21,11 @@ class Sidebar extends Controller }); } + public function index() + { + return view('system_settings.sidebar.index'); + } + public function edit(Request $request) { $subjects = $this->subjects(); @@ -63,7 +68,7 @@ class Sidebar extends Controller flash('保存成功,侧边栏权限已更新。')->success(); - return redirect()->route('dashboard'); + return redirect()->route('system-settings.sidebar.edit', ['subject' => $subject]); } private function subjects(): array @@ -72,7 +77,6 @@ class Sidebar extends Controller if (SystemAccess::isSuperAdmin()) { $subjects = [ - 'role_super_admin' => '用户类型:' . $labels[SystemAccess::SUPER_ADMIN], 'role_admin' => '用户类型:' . $labels[SystemAccess::ADMIN], 'role_user' => '用户类型:' . $labels[SystemAccess::USER], ]; @@ -94,6 +98,9 @@ class Sidebar extends Controller foreach ($users as $managedUser) { $role = SystemAccess::roleName($managedUser); + if ($role === SystemAccess::SUPER_ADMIN) { + continue; + } $subjects['user_' . $managedUser->id] = '指定用户:' . $managedUser->name . ' - ' . ($labels[$role] ?? $role); } diff --git a/app/Http/Controllers/SystemSettings/Users.php b/app/Http/Controllers/SystemSettings/Users.php index e6a78333..d235de0c 100644 --- a/app/Http/Controllers/SystemSettings/Users.php +++ b/app/Http/Controllers/SystemSettings/Users.php @@ -87,12 +87,14 @@ class Users extends Controller $role = Role::where('name', $data['role'])->firstOrFail(); if ( - $managedUser->id === user()->id - && SystemAccess::isSuperAdmin($managedUser) - && $data['role'] !== SystemAccess::SUPER_ADMIN + SystemAccess::isSuperAdmin($managedUser) + && $managedUser->enabled + && ($data['role'] !== SystemAccess::SUPER_ADMIN || ! ($data['enabled'] ?? false)) && $this->superAdminCount() <= 1 ) { - return back()->withErrors(['role' => '系统至少需要保留一名超级管理员。'])->withInput(); + return back()->withErrors([ + $data['role'] !== SystemAccess::SUPER_ADMIN ? 'role' : 'enabled' => '系统至少需要保留一名启用的主管理员。', + ])->withInput(); } if ($managedUser->id === user()->id && ! ($data['enabled'] ?? false)) { @@ -111,9 +113,11 @@ class Users extends Controller } $managedUser->update($attributes); - $managedUser->roles()->sync([$role->id]); + $managedUser->syncRoles([$role->id]); }); + $managedUser->flushCache(); + flash('用户已修改。')->success(); return redirect()->route('system-settings.users.index'); @@ -126,8 +130,8 @@ class Users extends Controller abort_if($managedUser->id === user()->id, 422, '不能删除当前登录账号。'); abort_unless(SystemAccess::canManageUser(user(), $managedUser), 403); - if (SystemAccess::isSuperAdmin($managedUser) && $this->superAdminCount() <= 1) { - return back()->withErrors(['user' => '系统至少需要保留一名超级管理员。']); + if (SystemAccess::isSuperAdmin($managedUser) && $managedUser->enabled && $this->superAdminCount() <= 1) { + return back()->withErrors(['user' => '系统至少需要保留一名启用的主管理员。']); } $managedUser->delete(); @@ -143,10 +147,6 @@ class Users extends Controller $company->where('companies.id', company_id()); }); - if (! SystemAccess::isSuperAdmin()) { - $query->whereHas('roles', fn ($roles) => $roles->where('roles.name', SystemAccess::USER)); - } - return $query; } @@ -176,6 +176,7 @@ class Users extends Controller private function superAdminCount(): int { return User::query() + ->where('enabled', true) ->whereHas('roles', fn ($roles) => $roles->where('roles.name', SystemAccess::SUPER_ADMIN)) ->count(); } diff --git a/app/Http/Livewire/Menu/Settings.php b/app/Http/Livewire/Menu/Settings.php index 9d0cc611..6debfa40 100644 --- a/app/Http/Livewire/Menu/Settings.php +++ b/app/Http/Livewire/Menu/Settings.php @@ -26,7 +26,7 @@ class Settings extends Component $items = [ ['system-settings.users.index', '用户管理', 'people', '用户 类型 权限'], - ['system-settings.sidebar.edit', '侧边栏管理', 'menu', '侧边栏 用户类型 指定管理员'], + ['system-settings.permissions.index', '权限管理', 'admin_panel_settings', '侧边栏 用户页面 访问权限 管理员 身份'], ['system-settings.databases.index', '数据库管理', 'storage', '系统数据库 云数据库 上游 连接 测试'], ]; @@ -38,6 +38,8 @@ class Settings extends Component $item = $menu->route($route, $title, [], ($index + 1) * 10, [ 'icon' => $icon, 'search_keywords' => $keywords, + 'active' => fn () => request()->routeIs(Str::beforeLast($route, '.') . '.*') + || ($route === 'system-settings.permissions.index' && request()->routeIs('system-settings.sidebar.*')), ]); if ($item->isActive()) { diff --git a/app/Http/Requests/Auth/User.php b/app/Http/Requests/Auth/User.php index 88e7a5cb..c0f76b47 100644 --- a/app/Http/Requests/Auth/User.php +++ b/app/Http/Requests/Auth/User.php @@ -14,6 +14,30 @@ class User extends FormRequest */ public function authorize() { + $actor = $this->user(); + if ($actor && ! \App\Utilities\SystemAccess::isSuperAdmin($actor)) { + $target = $this->route('user'); + $target = $target instanceof \App\Models\Auth\User ? $target : \App\Models\Auth\User::find($target); + if ($target && $target->id !== $actor->id && \App\Utilities\SystemAccess::canOpenSettings($target)) { + return false; + } + if ($this->filled('permissions')) { + return false; + } + if ($this->has('roles')) { + $requested = array_map('strval', (array) $this->input('roles')); + $current = $target ? $target->roles()->pluck('id')->map(fn ($id) => (string) $id)->all() : []; + sort($requested); + sort($current); + if ($requested !== $current) { + $allowed = \App\Models\Auth\Role::where('name', 'user')->pluck('id')->map(fn ($id) => (string) $id)->all(); + if (array_diff($requested, $allowed)) { + return false; + } + } + } + } + return true; } diff --git a/app/Listeners/Menu/ShowInSettings.php b/app/Listeners/Menu/ShowInSettings.php index cef742aa..100e4660 100644 --- a/app/Listeners/Menu/ShowInSettings.php +++ b/app/Listeners/Menu/ShowInSettings.php @@ -19,7 +19,7 @@ class ShowInSettings { $menu = $event->menu; - if (user()?->hasRole('admin')) { + if (\App\Utilities\SystemAccess::canOpenSettings()) { $menu->route('settings.navigation.manage', '侧边栏功能名称', [], 75, [ 'icon' => 'menu', 'search_keywords' => '侧边栏 功能 名称', diff --git a/app/Utilities/SidebarPermissions.php b/app/Utilities/SidebarPermissions.php index 0c36a020..04e4575d 100644 --- a/app/Utilities/SidebarPermissions.php +++ b/app/Utilities/SidebarPermissions.php @@ -31,6 +31,10 @@ class SidebarPermissions public static function allowedKeys(User $user): ?array { + if (SystemAccess::isSuperAdmin($user)) { + return null; + } + $settings = self::settings(); $subject = self::subjectKey($user); @@ -57,7 +61,7 @@ class SidebarPermissions return $section; } - $pages = array_values(array_filter($section['pages'] ?? [], function (array $page) use ($allowed, $sectionKey) { + $pages = array_values(array_filter(array_map(function (array $page) use ($allowed, $sectionKey) { $pageKey = $sectionKey . '/' . $page['slug']; if (in_array($pageKey, $allowed, true)) { @@ -67,7 +71,7 @@ class SidebarPermissions return in_array($sectionKey . '/' . $child['slug'], $allowed, true); })); } - return true; + return $page; } // 子页面可能在 allowed 列表中(独立 URL),父级分组也允许展开 @@ -77,12 +81,12 @@ class SidebarPermissions })); if (! empty($visibleChildren)) { $page['children'] = $visibleChildren; - return true; + return $page; } } - return false; - })); + return null; + }, $section['pages'] ?? []))); if (! empty($pages)) { $section['pages'] = $pages; diff --git a/app/Utilities/SystemAccess.php b/app/Utilities/SystemAccess.php index 4632792b..0b39f376 100644 --- a/app/Utilities/SystemAccess.php +++ b/app/Utilities/SystemAccess.php @@ -18,8 +18,11 @@ class SystemAccess return ''; } + // 身份变更必须立即生效,不能沿用权限库中已缓存的旧角色。 + $roles = $user->roles()->pluck('name')->all(); + foreach ([self::SUPER_ADMIN, self::ADMIN, self::USER] as $role) { - if ($user->hasRole($role)) { + if (in_array($role, $roles, true)) { return $role; } } @@ -53,8 +56,8 @@ class SystemAccess if (self::isSuperAdmin($actor)) { return [ - self::SUPER_ADMIN => '超级管理员', - self::ADMIN => '普通管理员', + self::SUPER_ADMIN => '主管理员(最高权限)', + self::ADMIN => '管理员', self::USER => '普通用户', ]; } @@ -65,8 +68,8 @@ class SystemAccess public static function roleLabels(): array { return [ - self::SUPER_ADMIN => '超级管理员', - self::ADMIN => '普通管理员', + self::SUPER_ADMIN => '主管理员', + self::ADMIN => '管理员', self::USER => '普通用户', ]; } diff --git a/resources/views/system_settings/partials/navigation-script.blade.php b/resources/views/system_settings/partials/navigation-script.blade.php new file mode 100644 index 00000000..351c9cbf --- /dev/null +++ b/resources/views/system_settings/partials/navigation-script.blade.php @@ -0,0 +1,74 @@ +@once +@push('scripts_start') + +@endpush +@endonce diff --git a/resources/views/system_settings/partials/navigation.blade.php b/resources/views/system_settings/partials/navigation.blade.php index b43c8795..65e1e1d4 100644 --- a/resources/views/system_settings/partials/navigation.blade.php +++ b/resources/views/system_settings/partials/navigation.blade.php @@ -1,21 +1,23 @@ -