refactor: [authz] 역할/권한 API 품질 개선
- Validator::make를 FormRequest로 분리 (6개 생성) - 하드코딩 한글 문자열을 i18n 키로 교체 - RoleMenuPermission 데드코드 제거 - Role 모델 SpatieRole 상속으로 일원화 - 권한 변경 후 캐시 무효화 추가 (AccessService::bumpVersion) - 미문서화 8개 Swagger 엔드포인트 추가 - 역할/권한 라우트에 perm.map+permission 미들웨어 추가
This commit is contained in:
@@ -32,6 +32,16 @@
|
||||
// Server errors
|
||||
'server_error' => 'An internal server error occurred.', // 5xx
|
||||
|
||||
// Role/Permission related
|
||||
'role' => [
|
||||
'not_found' => 'Role not found.',
|
||||
'permission_input_required' => 'Either permission_names or menus+actions is required.',
|
||||
'no_valid_permissions' => 'No valid permissions found.',
|
||||
'role_input_required' => 'Either role_names or role_ids is required.',
|
||||
'no_valid_roles' => 'No valid roles found.',
|
||||
'user_not_found' => 'User not found.',
|
||||
],
|
||||
|
||||
// Estimate related errors
|
||||
'estimate' => [
|
||||
'cannot_delete_sent_or_approved' => 'Cannot delete estimates that have been sent or approved.',
|
||||
|
||||
Reference in New Issue
Block a user