Spaces:
Sleeping
Sleeping
Add report viewing and exporting permissions to manager and dispatcher roles
Browse files
docs/api/reports/reports-and-exports.md
CHANGED
|
@@ -251,8 +251,8 @@ POST /api/v1/export/{entity}/export
|
|
| 251 |
| CLIENT_ADMIN | β | β | β
(all data) |
|
| 252 |
| CONTRACTOR_ADMIN | β | β | β
(all data) |
|
| 253 |
| PROJECT_MANAGER | β
| β
| β
(project-scoped) |
|
| 254 |
-
| SALES_MANAGER |
|
| 255 |
-
| DISPATCHER |
|
| 256 |
| FIELD_AGENT | β | β | β |
|
| 257 |
| SALES_AGENT | β | β | β |
|
| 258 |
|
|
|
|
| 251 |
| CLIENT_ADMIN | β | β | β
(all data) |
|
| 252 |
| CONTRACTOR_ADMIN | β | β | β
(all data) |
|
| 253 |
| PROJECT_MANAGER | β
| β
| β
(project-scoped) |
|
| 254 |
+
| SALES_MANAGER | β
| β
| β
(project-scoped) |
|
| 255 |
+
| DISPATCHER | β
| β
| β
(project-scoped) |
|
| 256 |
| FIELD_AGENT | β | β | β |
|
| 257 |
| SALES_AGENT | β | β | β |
|
| 258 |
|
docs/api/reports/reports.md
CHANGED
|
@@ -9,7 +9,7 @@ The Reports API provides business intelligence reports with pre-calculated metri
|
|
| 9 |
**Authorization:**
|
| 10 |
- `view_reports` permission required for viewing
|
| 11 |
- `export_reports` permission required for CSV downloads
|
| 12 |
-
- Available to: PLATFORM_ADMIN, PROJECT_MANAGER
|
| 13 |
|
| 14 |
---
|
| 15 |
|
|
|
|
| 9 |
**Authorization:**
|
| 10 |
- `view_reports` permission required for viewing
|
| 11 |
- `export_reports` permission required for CSV downloads
|
| 12 |
+
- Available to: PLATFORM_ADMIN, PROJECT_MANAGER, DISPATCHER, SALES_MANAGER
|
| 13 |
|
| 14 |
---
|
| 15 |
|
docs/devlogs/server/runtimeerror.txt
CHANGED
|
@@ -1,146 +1,69 @@
|
|
| 1 |
-
===== Application Startup at 2025-12-14
|
| 2 |
|
| 3 |
INFO: Started server process [7]
|
| 4 |
INFO: Waiting for application startup.
|
| 5 |
-
INFO: 2025-12-
|
| 6 |
-
INFO: 2025-12-
|
| 7 |
-
INFO: 2025-12-
|
| 8 |
-
INFO: 2025-12-
|
| 9 |
-
INFO: 2025-12-
|
| 10 |
-
INFO: 2025-12-
|
| 11 |
-
INFO: 2025-12-
|
| 12 |
-
INFO: 2025-12-
|
| 13 |
-
INFO: 2025-12-
|
| 14 |
-
INFO: 2025-12-
|
| 15 |
-
INFO: 2025-12-
|
| 16 |
-
INFO: 2025-12-
|
| 17 |
-
INFO: 2025-12-
|
| 18 |
-
INFO: 2025-12-
|
| 19 |
-
INFO: 2025-12-
|
| 20 |
-
INFO: 2025-12-
|
| 21 |
-
INFO: 2025-12-
|
| 22 |
INFO: Application startup complete.
|
| 23 |
INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
|
| 24 |
-
INFO: 10.16.13.79:
|
| 25 |
-
INFO: 10.16.
|
| 26 |
-
INFO: 2025-12-
|
| 27 |
-
INFO: 2025-12-
|
| 28 |
-
INFO:
|
| 29 |
-
INFO:
|
| 30 |
-
INFO: 2025-12-
|
| 31 |
-
INFO:
|
| 32 |
-
INFO:
|
| 33 |
-
INFO: 2025-12-
|
| 34 |
-
INFO:
|
| 35 |
-
INFO:
|
| 36 |
-
INFO: 2025-12-
|
| 37 |
-
INFO:
|
| 38 |
-
INFO:
|
| 39 |
-
INFO: 2025-12-
|
| 40 |
-
INFO:
|
| 41 |
-
INFO:
|
| 42 |
-
INFO: 2025-12-
|
| 43 |
-
INFO:
|
| 44 |
-
INFO: 2025-12-
|
| 45 |
-
INFO:
|
| 46 |
-
INFO: 10.16.
|
| 47 |
-
INFO:
|
| 48 |
-
INFO:
|
| 49 |
-
INFO:
|
| 50 |
-
INFO:
|
| 51 |
-
INFO: 10.16.
|
| 52 |
-
INFO: 2025-12-
|
| 53 |
-
INFO: 2025-12-
|
| 54 |
-
INFO:
|
| 55 |
-
INFO:
|
| 56 |
-
INFO: 10.16.
|
| 57 |
-
INFO:
|
| 58 |
-
INFO:
|
| 59 |
-
INFO: 10.16.
|
| 60 |
-
INFO:
|
| 61 |
-
INFO:
|
| 62 |
-
|
| 63 |
-
INFO: 10.16.13.79:
|
| 64 |
-
|
| 65 |
-
INFO: 10.16.13.79:
|
| 66 |
-
|
| 67 |
-
INFO:
|
| 68 |
-
|
| 69 |
-
INFO:
|
| 70 |
-
INFO: 2025-12-14T18:23:45 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 71 |
-
INFO: 10.16.13.79:61923 - "GET /api/v1/analytics/user/overview HTTP/1.1" 200 OK
|
| 72 |
-
INFO: 2025-12-14T18:23:51 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 73 |
-
INFO: 2025-12-14T18:23:51 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 74 |
-
INFO: 2025-12-14T18:23:51 - app.services.project_service: Listed 1 projects (total: 1) for user c5cf92be-4172-4fe2-af5c-f05d83b3a938
|
| 75 |
-
INFO: 10.16.25.209:16602 - "GET /api/v1/projects?page=1&per_page=100 HTTP/1.1" 200 OK
|
| 76 |
-
INFO: 2025-12-14T18:23:53 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 77 |
-
INFO: 2025-12-14T18:23:53 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 78 |
-
INFO: 2025-12-14T18:23:54 - app.services.audit_service: Audit log created: update on user_preferences by nadina73@nembors.com
|
| 79 |
-
INFO: 2025-12-14T18:23:54 - app.api.v1.auth: Preferences updated for user: nadina73@nembors.com
|
| 80 |
-
INFO: 10.16.25.209:16602 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
|
| 81 |
-
INFO: 2025-12-14T18:23:54 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 82 |
-
INFO: 2025-12-14T18:23:54 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 83 |
-
INFO: 10.16.13.79:18649 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
|
| 84 |
-
INFO: 2025-12-14T18:23:55 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 85 |
-
INFO: 2025-12-14T18:23:55 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 86 |
-
INFO: 2025-12-14T18:23:55 - app.services.dashboard_service: Dashboard cache MISS for project 0ade6bd1-e492-4e25-b681-59f42058d29a, user c5cf92be-4172-4fe2-af5c-f05d83b3a938 - building fresh data
|
| 87 |
-
INFO: 2025-12-14T18:23:56 - app.services.dashboard_service: Built and cached dashboard for project 0ade6bd1-e492-4e25-b681-59f42058d29a
|
| 88 |
-
INFO: 10.16.25.209:16602 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/dashboard HTTP/1.1" 200 OK
|
| 89 |
-
INFO: 10.16.25.209:16602 - "GET /api/v1/notifications?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&page_size=50&is_read=false HTTP/1.1" 200 OK
|
| 90 |
-
INFO: 10.16.13.79:18649 - "GET /api/v1/tickets/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a HTTP/1.1" 200 OK
|
| 91 |
-
INFO: 10.16.25.209:15477 - "GET /api/v1/notifications?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&page_size=50&from_date=2025-12-14 HTTP/1.1" 200 OK
|
| 92 |
-
INFO: 2025-12-14T18:24:29 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 93 |
-
INFO: 2025-12-14T18:24:29 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 94 |
-
INFO: 10.16.13.79:58405 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/team HTTP/1.1" 200 OK
|
| 95 |
-
INFO: 2025-12-14T18:24:29 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 96 |
-
INFO: 2025-12-14T18:24:29 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 97 |
-
INFO: 10.16.13.79:44688 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/subcontractors HTTP/1.1" 200 OK
|
| 98 |
-
INFO: 2025-12-14T18:24:29 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 99 |
-
INFO: 2025-12-14T18:24:29 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 100 |
-
INFO: 10.16.25.209:4203 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/team/invitations HTTP/1.1" 200 OK
|
| 101 |
-
INFO: 2025-12-14T18:24:30 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 102 |
-
INFO: 2025-12-14T18:24:30 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 103 |
-
INFO: 10.16.13.79:37567 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
|
| 104 |
-
INFO: 2025-12-14T18:24:30 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 105 |
-
INFO: 2025-12-14T18:24:30 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 106 |
-
INFO: 10.16.25.209:50737 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/project-roles HTTP/1.1" 200 OK
|
| 107 |
-
INFO: 2025-12-14T18:24:30 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 108 |
-
INFO: 2025-12-14T18:24:30 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 109 |
-
INFO: 10.16.25.209:43330 - "GET /api/v1/users?skip=0&limit=100 HTTP/1.1" 200 OK
|
| 110 |
-
INFO: 10.16.13.79:60719 - "GET /health HTTP/1.1" 200 OK
|
| 111 |
-
INFO: 10.16.13.79:6045 - "GET /health HTTP/1.1" 200 OK
|
| 112 |
-
INFO: 2025-12-14T18:31:46 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 113 |
-
INFO: 2025-12-14T18:31:46 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 114 |
-
INFO: 10.16.13.79:6045 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/project-roles HTTP/1.1" 200 OK
|
| 115 |
-
INFO: 2025-12-14T18:31:47 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 116 |
-
INFO: 2025-12-14T18:31:47 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 117 |
-
INFO: 10.16.13.79:6045 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/subcontractors HTTP/1.1" 200 OK
|
| 118 |
-
INFO: 2025-12-14T18:31:47 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 119 |
-
INFO: 2025-12-14T18:31:47 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 120 |
-
INFO: 10.16.25.209:53924 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/regions HTTP/1.1" 200 OK
|
| 121 |
-
INFO: 2025-12-14T18:32:12 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 122 |
-
INFO: 2025-12-14T18:32:12 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 123 |
-
INFO: 2025-12-14T18:32:12 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 124 |
-
INFO: 2025-12-14T18:32:12 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 125 |
-
INFO: 10.16.13.79:5532 - "GET /api/v1/payroll?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&period_start_date=2025-12-08&period_end_date=2025-12-14&page=1&page_size=20 HTTP/1.1" 200 OK
|
| 126 |
-
INFO: 10.16.25.209:34749 - "GET /api/v1/payroll/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&period_start_date=2025-12-08&period_end_date=2025-12-14 HTTP/1.1" 422 Unprocessable Entity
|
| 127 |
-
INFO: 2025-12-14T18:32:13 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 128 |
-
INFO: 2025-12-14T18:32:13 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 129 |
-
INFO: 10.16.13.79:5532 - "GET /api/v1/payroll/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&period_start_date=2025-12-08&period_end_date=2025-12-14 HTTP/1.1" 422 Unprocessable Entity
|
| 130 |
-
INFO: 10.16.25.209:1062 - "GET /health HTTP/1.1" 200 OK
|
| 131 |
-
INFO: 10.16.13.79:64673 - "GET /health HTTP/1.1" 200 OK
|
| 132 |
-
INFO: 10.16.13.79:29472 - "GET /health HTTP/1.1" 200 OK
|
| 133 |
-
INFO: 10.16.25.209:12335 - "GET /health HTTP/1.1" 200 OK
|
| 134 |
-
INFO: 10.16.25.209:42061 - "GET /health HTTP/1.1" 200 OK
|
| 135 |
-
INFO: 10.16.25.209:40286 - "GET /health HTTP/1.1" 200 OK
|
| 136 |
-
INFO: 10.16.25.209:46602 - "GET /health HTTP/1.1" 200 OK
|
| 137 |
-
INFO: 10.16.13.79:60834 - "GET /health HTTP/1.1" 200 OK
|
| 138 |
-
INFO: 10.16.25.209:62545 - "GET /health HTTP/1.1" 200 OK
|
| 139 |
-
INFO: 10.16.25.209:64921 - "GET /health HTTP/1.1" 200 OK
|
| 140 |
-
INFO: 10.16.13.79:35302 - "GET /health HTTP/1.1" 200 OK
|
| 141 |
-
|
| 142 |
-
help me document the reporting feature for the frontend team, we need to make sure that we create just one markdown file that is focused and that goes over the endpoint the purpose and then the payload (data shape) in the request and the response
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
please help me create this one doc and we can create it in the folder D:\atomio\swiftops-backend\docs\api\reports
|
|
|
|
| 1 |
+
===== Application Startup at 2025-12-14 19:49:18 =====
|
| 2 |
|
| 3 |
INFO: Started server process [7]
|
| 4 |
INFO: Waiting for application startup.
|
| 5 |
+
INFO: 2025-12-14T19:49:29 - app.main: ============================================================
|
| 6 |
+
INFO: 2025-12-14T19:49:29 - app.main: π SwiftOps API v1.0.0 | PRODUCTION
|
| 7 |
+
INFO: 2025-12-14T19:49:29 - app.main: π Dashboard: Enabled
|
| 8 |
+
INFO: 2025-12-14T19:49:29 - app.main: ============================================================
|
| 9 |
+
INFO: 2025-12-14T19:49:29 - app.main: π¦ Database:
|
| 10 |
+
INFO: 2025-12-14T19:49:29 - app.main: β Connected | 45 tables | 6 users
|
| 11 |
+
INFO: 2025-12-14T19:49:29 - app.main: πΎ Cache & Sessions:
|
| 12 |
+
INFO: 2025-12-14T19:49:30 - app.services.otp_service: β
OTP Service initialized with Redis storage
|
| 13 |
+
INFO: 2025-12-14T19:49:30 - app.main: β Redis: Connected
|
| 14 |
+
INFO: 2025-12-14T19:49:30 - app.main: π External Services:
|
| 15 |
+
INFO: 2025-12-14T19:49:31 - app.main: β Cloudinary: Connected
|
| 16 |
+
INFO: 2025-12-14T19:49:31 - app.main: β Resend: Configured
|
| 17 |
+
INFO: 2025-12-14T19:49:31 - app.main: β WASender: Disconnected
|
| 18 |
+
INFO: 2025-12-14T19:49:31 - app.main: β Supabase: Connected | 6 buckets
|
| 19 |
+
INFO: 2025-12-14T19:49:31 - app.main: ============================================================
|
| 20 |
+
INFO: 2025-12-14T19:49:31 - app.main: β
Startup complete | Ready to serve requests
|
| 21 |
+
INFO: 2025-12-14T19:49:31 - app.main: ============================================================
|
| 22 |
INFO: Application startup complete.
|
| 23 |
INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
|
| 24 |
+
INFO: 10.16.13.79:42074 - "GET / HTTP/1.1" 200 OK
|
| 25 |
+
INFO: 10.16.25.209:39298 - "GET /health HTTP/1.1" 200 OK
|
| 26 |
+
INFO: 2025-12-14T20:20:49 - app.core.supabase_auth: User signed in successfully: nadina73@nembors.com
|
| 27 |
+
INFO: 2025-12-14T20:20:49 - app.services.audit_service: Audit log created: login on auth by nadina73@nembors.com
|
| 28 |
+
INFO: 2025-12-14T20:20:49 - app.api.v1.auth: User logged in successfully: nadina73@nembors.com
|
| 29 |
+
INFO: 10.16.13.79:14616 - "POST /api/v1/auth/login HTTP/1.1" 200 OK
|
| 30 |
+
INFO: 2025-12-14T20:20:50 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 31 |
+
INFO: 2025-12-14T20:20:50 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 32 |
+
INFO: 10.16.25.209:27263 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
|
| 33 |
+
INFO: 2025-12-14T20:20:51 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 34 |
+
INFO: 2025-12-14T20:20:51 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 35 |
+
INFO: 10.16.25.209:27263 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
|
| 36 |
+
INFO: 2025-12-14T20:20:51 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 37 |
+
INFO: 2025-12-14T20:20:51 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 38 |
+
INFO: 10.16.13.79:14616 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
|
| 39 |
+
INFO: 2025-12-14T20:20:51 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 40 |
+
INFO: 2025-12-14T20:20:51 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 41 |
+
INFO: 10.16.25.209:14211 - "GET /api/v1/analytics/user/overview HTTP/1.1" 200 OK
|
| 42 |
+
INFO: 2025-12-14T20:20:53 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 43 |
+
INFO: 2025-12-14T20:20:53 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 44 |
+
INFO: 2025-12-14T20:20:53 - app.services.project_service: Listed 1 projects (total: 1) for user c5cf92be-4172-4fe2-af5c-f05d83b3a938
|
| 45 |
+
INFO: 10.16.25.209:14211 - "GET /api/v1/projects?page=1&per_page=100 HTTP/1.1" 200 OK
|
| 46 |
+
INFO: 10.16.25.209:15940 - "GET /health HTTP/1.1" 200 OK
|
| 47 |
+
INFO: 2025-12-14T20:21:27 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 48 |
+
INFO: 2025-12-14T20:21:27 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 49 |
+
INFO: 2025-12-14T20:21:27 - app.services.audit_service: Audit log created: update on user_preferences by nadina73@nembors.com
|
| 50 |
+
INFO: 2025-12-14T20:21:27 - app.api.v1.auth: Preferences updated for user: nadina73@nembors.com
|
| 51 |
+
INFO: 10.16.13.79:2979 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
|
| 52 |
+
INFO: 2025-12-14T20:21:27 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 53 |
+
INFO: 2025-12-14T20:21:27 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 54 |
+
INFO: 2025-12-14T20:21:27 - app.services.dashboard_service: Dashboard cache MISS for project 0ade6bd1-e492-4e25-b681-59f42058d29a, user c5cf92be-4172-4fe2-af5c-f05d83b3a938 - building fresh data
|
| 55 |
+
INFO: 2025-12-14T20:21:28 - app.services.dashboard_service: Built and cached dashboard for project 0ade6bd1-e492-4e25-b681-59f42058d29a
|
| 56 |
+
INFO: 10.16.25.209:3022 - "GET /api/v1/projects/0ade6bd1-e492-4e25-b681-59f42058d29a/dashboard HTTP/1.1" 200 OK
|
| 57 |
+
INFO: 2025-12-14T20:21:28 - app.api.deps: Checking active user: c5cf92be-4172-4fe2-af5c-f05d83b3a938, is_active: True, type: <class 'bool'>
|
| 58 |
+
INFO: 2025-12-14T20:21:28 - app.api.deps: User c5cf92be-4172-4fe2-af5c-f05d83b3a938 is active - proceeding
|
| 59 |
+
INFO: 10.16.13.79:2979 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
|
| 60 |
+
INFO: 10.16.13.79:2979 - "GET /api/v1/notifications?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&page_size=50&is_read=false HTTP/1.1" 200 OK
|
| 61 |
+
INFO: 10.16.25.209:3022 - "GET /api/v1/tickets/stats?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a HTTP/1.1" 200 OK
|
| 62 |
+
WARNING: 2025-12-14T20:21:33 - app.core.permissions: Permission denied: User nadina73@nembors.com (role=project_manager) attempted generate_report requiring 'view_reports'
|
| 63 |
+
INFO: 10.16.13.79:43635 - "POST /api/v1/reports/generate HTTP/1.1" 403 Forbidden
|
| 64 |
+
WARNING: 2025-12-14T20:21:35 - app.core.permissions: Permission denied: User nadina73@nembors.com (role=project_manager) attempted generate_report requiring 'view_reports'
|
| 65 |
+
INFO: 10.16.13.79:43635 - "POST /api/v1/reports/generate HTTP/1.1" 403 Forbidden
|
| 66 |
+
WARNING: 2025-12-14T20:21:41 - app.core.permissions: Permission denied: User nadina73@nembors.com (role=project_manager) attempted generate_report requiring 'view_reports'
|
| 67 |
+
INFO: 10.16.25.209:50879 - "POST /api/v1/reports/generate HTTP/1.1" 403 Forbidden
|
| 68 |
+
WARNING: 2025-12-14T20:21:43 - app.core.permissions: Permission denied: User nadina73@nembors.com (role=project_manager) attempted generate_report requiring 'view_reports'
|
| 69 |
+
INFO: 10.16.25.209:50879 - "POST /api/v1/reports/generate HTTP/1.1" 403 Forbidden
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/app/core/permissions.py
CHANGED
|
@@ -155,6 +155,9 @@ ROLE_PERMISSIONS: Dict[AppRole, List[str]] = {
|
|
| 155 |
"view_invoices", # View invoice lists and details
|
| 156 |
"create_invoices", # Generate invoices from tickets
|
| 157 |
"manage_invoices", # Update invoice details
|
|
|
|
|
|
|
|
|
|
| 158 |
# Customers
|
| 159 |
"manage_customers",
|
| 160 |
"view_customers",
|
|
@@ -188,6 +191,9 @@ ROLE_PERMISSIONS: Dict[AppRole, List[str]] = {
|
|
| 188 |
"view_invoices", # View invoice lists and details
|
| 189 |
"create_invoices", # Generate invoices from tickets
|
| 190 |
"manage_invoices", # Update invoice details
|
|
|
|
|
|
|
|
|
|
| 191 |
# Customers
|
| 192 |
"manage_customers",
|
| 193 |
"view_customers",
|
|
@@ -244,7 +250,8 @@ ROLE_PERMISSIONS: Dict[AppRole, List[str]] = {
|
|
| 244 |
"manage_invoices", # Update invoice details
|
| 245 |
# Reports
|
| 246 |
"view_team_performance",
|
| 247 |
-
"
|
|
|
|
| 248 |
]
|
| 249 |
}
|
| 250 |
|
|
|
|
| 155 |
"view_invoices", # View invoice lists and details
|
| 156 |
"create_invoices", # Generate invoices from tickets
|
| 157 |
"manage_invoices", # Update invoice details
|
| 158 |
+
# Reports
|
| 159 |
+
"view_reports", # View business intelligence reports
|
| 160 |
+
"export_reports", # Export reports to CSV
|
| 161 |
# Customers
|
| 162 |
"manage_customers",
|
| 163 |
"view_customers",
|
|
|
|
| 191 |
"view_invoices", # View invoice lists and details
|
| 192 |
"create_invoices", # Generate invoices from tickets
|
| 193 |
"manage_invoices", # Update invoice details
|
| 194 |
+
# Reports
|
| 195 |
+
"view_reports", # View business intelligence reports
|
| 196 |
+
"export_reports", # Export reports to CSV
|
| 197 |
# Customers
|
| 198 |
"manage_customers",
|
| 199 |
"view_customers",
|
|
|
|
| 250 |
"manage_invoices", # Update invoice details
|
| 251 |
# Reports
|
| 252 |
"view_team_performance",
|
| 253 |
+
"view_reports", # View business intelligence reports
|
| 254 |
+
"export_reports" # Export reports to CSV
|
| 255 |
]
|
| 256 |
}
|
| 257 |
|