Role and Permission Management đ
Overviewâ
CmSupportTicket is a feature that allows users to create and manage support tickets within the application, which will get synced with the bridge system.
Usageâ
As mentioned above, this feature two applications running in parallel. App1 - Eg DRE - Running on port 3000 App2 - Eg Bridge - Running on port 3001
Bridge development setup:
-
Create a project for DRE in the bridge application, where tasks can be created.
-
Create a CmAdmin installation and associate the project.
-
Once created, copy the project key and add it to the DRE credentials file. It will look like this:
cm_admin:
project_access_key: PROJECT_KEY
Adding migrationâ
Run the following command to add necessary tables and columns
rails g cm_admin:add_cm_support_ticket
This Rake task generates three migration files
- One to create the cm_support_ticket table
- Second to create the cm_support_ticket_user table for assigning users
- Third to add created_by_name and email to cm_comment
Initializerâ
Add the CmSupportTicket to zcm_admin.rb file
CmAdmin.configure do |config|
config.included_models = [
# ... other models,
CmSupportTicket
]
config.sidebar = [
# ... other items,
{ path: :cm_index_cm_support_ticket_path }
]
end
Credentialsâ
For development set the project key in credentials file along with host_url
cm_admin:
project_access_key: your_project_key_here
For staging and production, Project key will already be present on the environment variable named BUNDLE_CM___GEMS__COMMUTATUS__COM in hatchbox/other services needed for the bridge integration.
Note: While running sidekiq, Run sidekiq on one application only, not on both. If we run in parallel, Jobs can run on other application and cause confusion. We need to fix this.