공개 (@Tuwasduliebst 제보) 대응. - ckeditor5: 미참조 이미지 정리 엔진 신설 — 참조 판정(hash + 파일명 2토큰, filter_reference_sources 훅으로 확장 콘텐츠 등록) + 정리 커맨드(기본 꺼짐 옵트인, 3중 게이트) + 업로드 관리 화면(권한 분리·참조 배지·개별/선택 삭제) + 기설치본 설정 백필 upgrade step - board: 임시 첨부 GC(상시) + 소프트삭제 첨부 영구 정리(옵트인) + 설정 UI, 저장 payload 누락(F4)·빈 temp 디렉토리 잔존(F5) 수정 - ecommerce: 임시 상품 이미지 GC + 카테고리 삭제 시 이미지 파일 미삭제(S4) 수정 - page: 임시 첨부 GC - 코어: 고아 첨부 정리 커맨드(옵트인, site_logo 보호) + 사이트 로고 교체 시 구 로고 재편입 차단(S6) + DB 백업 미구현 501 정직화(B3) + 플러그인 관리자 메뉴 설치·업데이트 자동 동기화(F1·F7) - 동반: 플러그인 설정 검증 오류 필드명 라벨화(F3), Toggle 노드 type 정정 수평 전개(marketing 1.0.2 bump·gdpr·ecommerce), ja 언어팩 4종, API 문서, hooks.md, 시나리오 매니페스트 8종, Playwright E2E 4종
204 lines
9.8 KiB
PHP
204 lines
9.8 KiB
PHP
<?php
|
|
|
|
return [
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 첨부파일 저장 설정
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'attachment' => [
|
|
'disk' => env('SIRSOFT_BOARD_ATTACHMENT_DISK', 'modules'),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 게시판별 권한 정의 (name, description)
|
|
|--------------------------------------------------------------------------
|
|
| 게시판별 동적 권한 생성 시 사용되는 권한 메타데이터입니다.
|
|
| BoardPermissionService에서 permissions 테이블에 레코드 생성 시 사용됩니다.
|
|
|
|
|
| 권한 구조:
|
|
| - admin.* : 관리자 권한 (type: admin, identifier: sirsoft-board.{slug}.admin.*)
|
|
| - 일반 키 : 사용자 권한 (type: user, identifier: sirsoft-board.{slug}.*)
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'board_permission_definitions' => [
|
|
// ========================================
|
|
// 관리자 권한 (type: admin)
|
|
// ========================================
|
|
'admin.posts.read' => [
|
|
'name' => ['ko' => '게시글 조회 (관리자)', 'en' => 'View Posts (Admin)'],
|
|
'description' => ['ko' => '관리자 페이지에서 게시글 조회', 'en' => 'View posts in admin page'],
|
|
'scope' => ['resource_route_key' => 'post', 'owner_key' => 'user_id'],
|
|
],
|
|
'admin.posts.write' => [
|
|
'name' => ['ko' => '게시글 작성/수정/삭제 (관리자)', 'en' => 'Create/Edit/Delete Posts (Admin)'],
|
|
'description' => ['ko' => '관리자 페이지에서 게시글 작성 및 수정/삭제', 'en' => 'Create and edit/delete posts in admin page'],
|
|
],
|
|
'admin.posts.read-secret' => [
|
|
'name' => ['ko' => '비밀글 조회 (관리자)', 'en' => 'View Secret Posts (Admin)'],
|
|
'description' => ['ko' => '관리자 페이지에서 비밀글 조회', 'en' => 'View secret posts in admin page'],
|
|
'scope' => ['resource_route_key' => 'post', 'owner_key' => 'user_id'],
|
|
],
|
|
'admin.comments.read' => [
|
|
'name' => ['ko' => '댓글 조회 (관리자)', 'en' => 'View Comments (Admin)'],
|
|
'description' => ['ko' => '관리자 페이지에서 댓글 조회', 'en' => 'View comments in admin page'],
|
|
'scope' => ['resource_route_key' => 'comment', 'owner_key' => 'user_id'],
|
|
],
|
|
'admin.comments.write' => [
|
|
'name' => ['ko' => '댓글 작성/수정/삭제 (관리자)', 'en' => 'Create/Edit/Delete Comments (Admin)'],
|
|
'description' => ['ko' => '관리자 페이지에서 댓글 작성 및 수정/삭제', 'en' => 'Create and edit/delete comments in admin page'],
|
|
],
|
|
'admin.attachments.upload' => [
|
|
'name' => ['ko' => '파일 업로드/삭제 (관리자)', 'en' => 'Upload/Delete Files (Admin)'],
|
|
'description' => ['ko' => '관리자 페이지에서 파일 업로드 및 삭제', 'en' => 'Upload and delete files in admin page'],
|
|
'scope' => ['resource_route_key' => 'attachment', 'owner_key' => 'created_by'],
|
|
],
|
|
'admin.attachments.download' => [
|
|
'name' => ['ko' => '파일 다운로드 (관리자)', 'en' => 'Download Files (Admin)'],
|
|
'description' => ['ko' => '관리자 페이지에서 파일 다운로드', 'en' => 'Download files in admin page'],
|
|
'scope' => ['resource_route_key' => 'attachment', 'owner_key' => 'created_by'],
|
|
],
|
|
'admin.manage' => [
|
|
'name' => ['ko' => '게시판 관리 (관리자)', 'en' => 'Manage Board (Admin)'],
|
|
'description' => ['ko' => '타인 게시글/댓글 관리, 블라인드, 복원, 공지 설정', 'en' => 'Manage others posts/comments, blind, restore, set notice'],
|
|
'scope' => ['resource_route_key' => 'board', 'owner_key' => 'created_by'],
|
|
],
|
|
|
|
// ========================================
|
|
// 사용자 권한 (type: user)
|
|
// ========================================
|
|
'posts.read' => [
|
|
'name' => ['ko' => '게시글 조회', 'en' => 'View Posts'],
|
|
'description' => ['ko' => '게시글 목록 및 상세 조회', 'en' => 'View post list and details'],
|
|
'scope' => ['resource_route_key' => 'post', 'owner_key' => 'user_id'],
|
|
],
|
|
'posts.write' => [
|
|
'name' => ['ko' => '게시글 작성/수정/삭제', 'en' => 'Create/Edit/Delete Posts'],
|
|
'description' => ['ko' => '게시글 작성 및 본인 글 수정/삭제', 'en' => 'Create posts and edit/delete own posts'],
|
|
],
|
|
'posts.read-secret' => [
|
|
'name' => ['ko' => '비밀글 조회', 'en' => 'View Secret Posts'],
|
|
'description' => ['ko' => '비밀글 조회', 'en' => 'View secret posts'],
|
|
'scope' => ['resource_route_key' => 'post', 'owner_key' => 'user_id'],
|
|
],
|
|
'comments.read' => [
|
|
'name' => ['ko' => '댓글 조회', 'en' => 'View Comments'],
|
|
'description' => ['ko' => '댓글 목록 조회', 'en' => 'View comment list'],
|
|
'scope' => ['resource_route_key' => 'comment', 'owner_key' => 'user_id'],
|
|
],
|
|
'comments.write' => [
|
|
'name' => ['ko' => '댓글 작성/수정/삭제', 'en' => 'Create/Edit/Delete Comments'],
|
|
'description' => ['ko' => '댓글 작성 및 본인 댓글 수정/삭제', 'en' => 'Create comments and edit/delete own comments'],
|
|
],
|
|
'attachments.upload' => [
|
|
'name' => ['ko' => '파일 업로드/삭제', 'en' => 'Upload/Delete Files'],
|
|
'description' => ['ko' => '게시글에 파일 첨부 및 삭제', 'en' => 'Attach and delete files to posts'],
|
|
'scope' => ['resource_route_key' => 'attachment', 'owner_key' => 'created_by'],
|
|
],
|
|
'attachments.download' => [
|
|
'name' => ['ko' => '파일 다운로드', 'en' => 'Download Files'],
|
|
'description' => ['ko' => '첨부파일 다운로드', 'en' => 'Download attached files'],
|
|
'scope' => ['resource_route_key' => 'attachment', 'owner_key' => 'created_by'],
|
|
],
|
|
'manager' => [
|
|
'name' => ['ko' => '게시판 관리 (사용자)', 'en' => 'Manage Board (User)'],
|
|
'description' => ['ko' => '사용자 페이지에서 게시판 관리', 'en' => 'Manage board in user page'],
|
|
'scope' => ['resource_route_key' => 'board', 'owner_key' => 'created_by'],
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 제한값
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'limits' => [
|
|
'per_page_min' => 5,
|
|
'per_page_max' => 100,
|
|
|
|
// 제목 길이 제한 (VARCHAR(200))
|
|
'min_title_length_min' => 0,
|
|
'min_title_length_max' => 200,
|
|
'max_title_length_min' => 1,
|
|
'max_title_length_max' => 1000,
|
|
|
|
// 내용 길이 제한 (LONGTEXT)
|
|
'min_content_length_min' => 0,
|
|
'min_content_length_max' => 10000,
|
|
'max_content_length_min' => 1,
|
|
'max_content_length_max' => 100000,
|
|
|
|
// 댓글 길이 제한 (TEXT)
|
|
'min_comment_length_min' => 0,
|
|
'min_comment_length_max' => 1000,
|
|
'max_comment_length_min' => 1,
|
|
'max_comment_length_max' => 10000,
|
|
|
|
// 파일 업로드 제한 (MB 단위)
|
|
'max_file_size_min' => 1,
|
|
'max_file_size_max' => 200,
|
|
'max_file_count_min' => 1,
|
|
'max_file_count_max' => 20,
|
|
|
|
'category_max' => 50,
|
|
|
|
// 신규 게시글 NEW 배지 표시 기간 (시간 단위, 0 = 표시 안 함)
|
|
'new_display_hours_min' => 0,
|
|
'new_display_hours_max' => 720,
|
|
|
|
// 답글 깊이 제한
|
|
'max_reply_depth_min' => 1,
|
|
'max_reply_depth_max' => 10,
|
|
|
|
// 대댓글 깊이 제한
|
|
'max_comment_depth_min' => 0,
|
|
'max_comment_depth_max' => 10,
|
|
|
|
// 삭제 첨부 영구 정리 보존기간 (일)
|
|
'attachment_purge_retention_days_min' => 1,
|
|
'attachment_purge_retention_days_max' => 3650,
|
|
|
|
// 신고 정책
|
|
'auto_hide_threshold_min' => 0,
|
|
'auto_hide_threshold_max' => 100,
|
|
'daily_report_limit_min' => 0,
|
|
'daily_report_limit_max' => 100,
|
|
'rejection_limit_count_min' => 0,
|
|
'rejection_limit_count_max' => 50,
|
|
'rejection_limit_days_min' => 1,
|
|
'rejection_limit_days_max' => 365,
|
|
|
|
// 스팸/보안 쿨다운 (초)
|
|
'post_cooldown_seconds_min' => 0,
|
|
'post_cooldown_seconds_max' => 3600,
|
|
'comment_cooldown_seconds_min' => 0,
|
|
'comment_cooldown_seconds_max' => 3600,
|
|
'report_cooldown_seconds_min' => 0,
|
|
'report_cooldown_seconds_max' => 3600,
|
|
'view_count_cache_ttl_min' => 60,
|
|
'view_count_cache_ttl_max' => 604800,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 캐시 설정
|
|
|--------------------------------------------------------------------------
|
|
| 게시판 통계, 최근 게시글, 인기 게시판 등에 적용되는 캐시 설정입니다.
|
|
*/
|
|
'cache' => [
|
|
'enabled' => env('BOARD_CACHE_ENABLED', true),
|
|
'ttl' => env('BOARD_CACHE_TTL', 60), // 통계/최근글/인기게시판 모두 적용 (초 단위)
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 성능 제한
|
|
|--------------------------------------------------------------------------
|
|
| 대용량 게시판 환경에서의 성능 최적화를 위한 설정입니다.
|
|
*/
|
|
'performance' => [
|
|
'max_union_boards' => 50, // UNION 쿼리 최대 게시판 수
|
|
],
|
|
];
|