Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions plugins/baser-core/config/Seeds/PermissionsSeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ class PermissionsSeed extends BcSeed
*/
public function run(): void
{
$baserCorePrefix = trim((string) env('BASER_CORE_PREFIX', 'baser'), '/');
$adminPrefix = trim((string) env('ADMIN_PREFIX', 'admin'), '/');
$adminUrlPrefix = '/' . $baserCorePrefix . '/' . $adminPrefix;

$data = [
[
'id' => 1,
'no' => 1,
'sort' => 1,
'name' => 'システム管理',
'user_group_id' => 2,
'url' => '/baser/admin/*',
'url' => $adminUrlPrefix . '/*',
'auth' => 0,
'status' => 1,
'created' => NULL,
Expand All @@ -40,7 +44,7 @@ public function run(): void
'sort' => 2,
'name' => 'ページ管理',
'user_group_id' => 2,
'url' => '/baser/admin/baser-core/pages/*',
'url' => $adminUrlPrefix . '/baser-core/pages/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -53,7 +57,7 @@ public function run(): void
'sort' => 3,
'name' => '新着情報記事管理',
'user_group_id' => 2,
'url' => '/baser/admin/bc-blog/blog_posts/*',
'url' => $adminUrlPrefix . '/bc-blog/blog_posts/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -66,7 +70,7 @@ public function run(): void
'sort' => 4,
'name' => '新着情報カテゴリ管理',
'user_group_id' => 2,
'url' => '/baser/admin/bc-blog/blog_categories/*',
'url' => $adminUrlPrefix . '/bc-blog/blog_categories/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -79,7 +83,7 @@ public function run(): void
'sort' => 5,
'name' => '新着情報コメント一覧',
'user_group_id' => 2,
'url' => '/baser/admin/bc-blog/blog_comments/*',
'url' => $adminUrlPrefix . '/bc-blog/blog_comments/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -92,7 +96,7 @@ public function run(): void
'sort' => 6,
'name' => 'ブログタグ管理',
'user_group_id' => 2,
'url' => '/baser/admin/bc-blog/blog_tags/*',
'url' => $adminUrlPrefix . '/bc-blog/blog_tags/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -105,7 +109,7 @@ public function run(): void
'sort' => 7,
'name' => 'お問い合わせ管理',
'user_group_id' => 2,
'url' => '/baser/admin/bc-mail/mail_fields/*',
'url' => $adminUrlPrefix . '/bc-mail/mail_fields/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -118,7 +122,7 @@ public function run(): void
'sort' => 8,
'name' => 'お問い合わせ受信メール一覧',
'user_group_id' => 2,
'url' => '/baser/admin/bc-mail/mail_messages/*',
'url' => $adminUrlPrefix . '/bc-mail/mail_messages/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -131,7 +135,7 @@ public function run(): void
'sort' => 9,
'name' => 'アップローダー',
'user_group_id' => 2,
'url' => '/baser/admin/bc-uploader/*',
'url' => $adminUrlPrefix . '/bc-uploader/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -144,7 +148,7 @@ public function run(): void
'sort' => 10,
'name' => 'コンテンツ管理',
'user_group_id' => 2,
'url' => '/baser/admin/baser-core/contents/*',
'url' => $adminUrlPrefix . '/baser-core/contents/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand All @@ -157,7 +161,7 @@ public function run(): void
'sort' => 11,
'name' => 'リンク管理',
'user_group_id' => 2,
'url' => '/baser/admin/baser-core/content_links/*',
'url' => $adminUrlPrefix . '/baser-core/content_links/*',
'auth' => 1,
'status' => 1,
'method' => 'ALL',
Expand Down
Loading
Loading