Currently, the application does not track which admin user created or modified events, QR codes, message templates, or other entities. While authentication is required for admin operations, there's no linking actions to specific admin users.
Problem:
as there is no way to determine which admin created a specific event, it is not possible to have multiple admins. plus it is not possible to group them or add a bunch of settings to them (like preferred email configuration type for that particular admin etc)
same issue exists for other admin-managed entities like QR codes and message templates
Current Behaviour:
assuming User ID is the primary key or the email ID, it is available in the JWT token but not stored uniformly everywhere in db (just the primary key to identify the user)
events and other entities are created without admin attribution
Expected Behaviour
the authentication already extracts user information from Clerk JWT tokens.
we need to explicitly store admin_id or email_id everywhere in the db to track which admin created each event/QR code/template and not trusting on created on (some places miss them as well)
Affected Tables
events
qr_codes
message_templates
Currently, the application does not track which admin user created or modified events, QR codes, message templates, or other entities. While authentication is required for admin operations, there's no linking actions to specific admin users.
Problem:
as there is no way to determine which admin created a specific event, it is not possible to have multiple admins. plus it is not possible to group them or add a bunch of settings to them (like preferred email configuration type for that particular admin etc)
same issue exists for other admin-managed entities like QR codes and message templates
Current Behaviour:
assuming User ID is the primary key or the email ID, it is available in the JWT token but not stored uniformly everywhere in db (just the primary key to identify the user)
events and other entities are created without admin attribution
Expected Behaviour
the authentication already extracts user information from Clerk JWT tokens.
we need to explicitly store admin_id or email_id everywhere in the db to track which admin created each event/QR code/template and not trusting on created on (some places miss them as well)
Affected Tables
events
qr_codes
message_templates