Initial commit: Add logistics and order_detail message types
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
- Add Logistics component with progress tracking - Add OrderDetail component for order information - Support data-driven steps and actions - Add blue color scale to widget SCSS - Fix node overflow and progress bar rendering issues - Add English translations for dashboard components Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
17
enterprise/app/policies/account_saml_settings_policy.rb
Normal file
17
enterprise/app/policies/account_saml_settings_policy.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class AccountSamlSettingsPolicy < ApplicationPolicy
|
||||
def show?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
21
enterprise/app/policies/agent_capacity_policy_policy.rb
Normal file
21
enterprise/app/policies/agent_capacity_policy_policy.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
class AgentCapacityPolicyPolicy < ApplicationPolicy
|
||||
def index?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def show?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
29
enterprise/app/policies/captain/assistant_policy.rb
Normal file
29
enterprise/app/policies/captain/assistant_policy.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
class Captain::AssistantPolicy < ApplicationPolicy
|
||||
def index?
|
||||
true
|
||||
end
|
||||
|
||||
def show?
|
||||
true
|
||||
end
|
||||
|
||||
def tools?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def playground?
|
||||
true
|
||||
end
|
||||
end
|
||||
21
enterprise/app/policies/captain/custom_tool_policy.rb
Normal file
21
enterprise/app/policies/captain/custom_tool_policy.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
class Captain::CustomToolPolicy < ApplicationPolicy
|
||||
def index?
|
||||
true
|
||||
end
|
||||
|
||||
def show?
|
||||
true
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
21
enterprise/app/policies/captain/scenario_policy.rb
Normal file
21
enterprise/app/policies/captain/scenario_policy.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
class Captain::ScenarioPolicy < ApplicationPolicy
|
||||
def index?
|
||||
true
|
||||
end
|
||||
|
||||
def show?
|
||||
true
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
25
enterprise/app/policies/company_policy.rb
Normal file
25
enterprise/app/policies/company_policy.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
class CompanyPolicy < ApplicationPolicy
|
||||
def index?
|
||||
true
|
||||
end
|
||||
|
||||
def search?
|
||||
true
|
||||
end
|
||||
|
||||
def show?
|
||||
true
|
||||
end
|
||||
|
||||
def create?
|
||||
true
|
||||
end
|
||||
|
||||
def update?
|
||||
true
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
21
enterprise/app/policies/custom_role_policy.rb
Normal file
21
enterprise/app/policies/custom_role_policy.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
class CustomRolePolicy < ApplicationPolicy
|
||||
def index?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def show?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
29
enterprise/app/policies/enterprise/article_policy.rb
Normal file
29
enterprise/app/policies/enterprise/article_policy.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
module Enterprise::ArticlePolicy
|
||||
def index?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def show?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def edit?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def reorder?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
end
|
||||
25
enterprise/app/policies/enterprise/category_policy.rb
Normal file
25
enterprise/app/policies/enterprise/category_policy.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
module Enterprise::CategoryPolicy
|
||||
def index?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def show?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def edit?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
end
|
||||
42
enterprise/app/policies/enterprise/conversation_policy.rb
Normal file
42
enterprise/app/policies/enterprise/conversation_policy.rb
Normal file
@@ -0,0 +1,42 @@
|
||||
module Enterprise::ConversationPolicy
|
||||
def show?
|
||||
return false unless super
|
||||
return true unless custom_role_permissions?
|
||||
|
||||
permissions = custom_role_permissions
|
||||
return true if manage_all_conversations?(permissions)
|
||||
return true if permits_unassigned_manage?(permissions)
|
||||
|
||||
permits_participating?(permissions)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def manage_all_conversations?(permissions)
|
||||
permissions.include?('conversation_manage')
|
||||
end
|
||||
|
||||
def permits_unassigned_manage?(permissions)
|
||||
return false unless permissions.include?('conversation_unassigned_manage')
|
||||
|
||||
unassigned_conversation? || assigned_to_user?
|
||||
end
|
||||
|
||||
def permits_participating?(permissions)
|
||||
return false unless permissions.include?('conversation_participating_manage')
|
||||
|
||||
assigned_to_user? || participant?
|
||||
end
|
||||
|
||||
def unassigned_conversation?
|
||||
record.assignee_id.nil?
|
||||
end
|
||||
|
||||
def custom_role_permissions?
|
||||
account_user&.custom_role_id.present?
|
||||
end
|
||||
|
||||
def custom_role_permissions
|
||||
account_user&.custom_role&.permissions || []
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
module Enterprise::CsatSurveyResponsePolicy
|
||||
def index?
|
||||
@account_user.custom_role&.permissions&.include?('report_manage') || super
|
||||
end
|
||||
|
||||
def metrics?
|
||||
@account_user.custom_role&.permissions&.include?('report_manage') || super
|
||||
end
|
||||
|
||||
def download?
|
||||
@account_user.custom_role&.permissions&.include?('report_manage') || super
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator? || @account_user.custom_role&.permissions&.include?('report_manage')
|
||||
end
|
||||
end
|
||||
13
enterprise/app/policies/enterprise/portal_policy.rb
Normal file
13
enterprise/app/policies/enterprise/portal_policy.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Enterprise::PortalPolicy
|
||||
def update?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def edit?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
|
||||
def logo?
|
||||
@account_user.custom_role&.permissions&.include?('knowledge_base_manage') || super
|
||||
end
|
||||
end
|
||||
5
enterprise/app/policies/enterprise/report_policy.rb
Normal file
5
enterprise/app/policies/enterprise/report_policy.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
module Enterprise::ReportPolicy
|
||||
def view?
|
||||
@account_user.custom_role&.permissions&.include?('report_manage') || super
|
||||
end
|
||||
end
|
||||
21
enterprise/app/policies/sla_policy_policy.rb
Normal file
21
enterprise/app/policies/sla_policy_policy.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
class SlaPolicyPolicy < ApplicationPolicy
|
||||
def index?
|
||||
@account_user.administrator? || @account_user.agent?
|
||||
end
|
||||
|
||||
def update?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def show?
|
||||
@account_user.administrator? || @account_user.agent?
|
||||
end
|
||||
|
||||
def create?
|
||||
@account_user.administrator?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user