chore: Add deployment checklist and PM2 configuration examples
CI / test-backend (pull_request) Successful in 5m30s
CI / build (pull_request) Has been skipped
CI / secret-scanning (pull_request) Has been skipped
CI / dependency-scan (pull_request) Has been skipped
CI / sast-scan (pull_request) Has been skipped
CI / lint-and-type-check (pull_request) Has been cancelled
CI / python-lint (pull_request) Has been cancelled
CI / workflow-summary (pull_request) Has been cancelled
CI / skip-ci-check (pull_request) Has been cancelled
CI / test-backend (pull_request) Successful in 5m30s
CI / build (pull_request) Has been skipped
CI / secret-scanning (pull_request) Has been skipped
CI / dependency-scan (pull_request) Has been skipped
CI / sast-scan (pull_request) Has been skipped
CI / lint-and-type-check (pull_request) Has been cancelled
CI / python-lint (pull_request) Has been cancelled
CI / workflow-summary (pull_request) Has been cancelled
CI / skip-ci-check (pull_request) Has been cancelled
This commit introduces a new `DEPLOYMENT_CHECKLIST.md` file that outlines the necessary steps for configuring server-specific settings after pulling from Git. It includes instructions for environment files, PM2 configuration, firewall rules, database setup, and building frontends. Additionally, it adds an example `ecosystem.config.js.example` file for PM2 configuration, providing a template for users to customize for their deployment environment. The `.gitignore` file is updated to include the new PM2 ecosystem config file.
This commit is contained in:
+12
-3
@@ -344,9 +344,18 @@ def get_current_user_info(
|
||||
is_admin = user.is_admin if user else False
|
||||
|
||||
role_value = _resolve_user_role(user, is_admin)
|
||||
permissions_map = fetch_role_permissions_map(db)
|
||||
permissions = permissions_map.get(role_value, {})
|
||||
|
||||
|
||||
# Fetch permissions - if it fails, return empty permissions to avoid blocking login
|
||||
try:
|
||||
permissions_map = fetch_role_permissions_map(db)
|
||||
permissions = permissions_map.get(role_value, {})
|
||||
except Exception as e:
|
||||
# If permissions fetch fails, return empty permissions to avoid blocking login
|
||||
# Log the error but don't fail the request
|
||||
import traceback
|
||||
print(f"⚠️ Failed to fetch permissions for /me endpoint: {e}")
|
||||
print(f" Traceback: {traceback.format_exc()}")
|
||||
permissions = {}
|
||||
return UserResponse(
|
||||
username=username,
|
||||
is_admin=is_admin,
|
||||
|
||||
Reference in New Issue
Block a user