fix(权限): 受限账号直达单页终版目录
修复受限账号进入单页终版目录时显示空目录总览。 Co-authored-by: 苏木 <594326199@qq.com> Co-committed-by: 苏木 <594326199@qq.com>
This commit is contained in:
parent
9875ced91b
commit
96f0fceab7
@ -1162,7 +1162,8 @@ class Pages extends Controller
|
||||
}
|
||||
|
||||
if ($page === null) {
|
||||
if ($section === 'courier-payables' || in_array($section, self::PAYABLES_FINAL_SECTIONS, true)) {
|
||||
if (! SidebarPermissions::hasLimitedDingTalkAccess(user())
|
||||
&& ($section === 'courier-payables' || in_array($section, self::PAYABLES_FINAL_SECTIONS, true))) {
|
||||
return view('business.pages.show', $this->viewData($sectionConfig));
|
||||
}
|
||||
|
||||
|
||||
@ -378,9 +378,11 @@ class DingTalkLoginTest extends FeatureTestCase
|
||||
'company_id' => $this->company->id,
|
||||
'section' => 'supplier-payables-final',
|
||||
]))
|
||||
->assertOk()
|
||||
->assertSeeText('赔偿明细')
|
||||
->assertDontSeeText('当前账号没有该页面权限');
|
||||
->assertRedirect(route('business.pages.show', [
|
||||
'company_id' => $this->company->id,
|
||||
'section' => 'supplier-payables-final',
|
||||
'page' => 'compensation-details',
|
||||
]));
|
||||
|
||||
$this->loginAs()
|
||||
->get(route('business.pages.show', [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user