chore: Custom Roles to manage permissions [ UI ] (#9865)
In admin settings, this Pr will add the UI for managing custom roles ( ref: https://github.com/chatwoot/chatwoot/pull/9995 ). It also handles the routing logic changes to accommodate fine-tuned permissions. --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -33,3 +33,5 @@ class ArticlePolicy < ApplicationPolicy
|
||||
@record.first.portal.members.include?(@user)
|
||||
end
|
||||
end
|
||||
|
||||
ArticlePolicy.prepend_mod_with('Enterprise::ArticlePolicy')
|
||||
|
||||
@@ -29,3 +29,5 @@ class CategoryPolicy < ApplicationPolicy
|
||||
@record.first.portal.members.include?(@user)
|
||||
end
|
||||
end
|
||||
|
||||
CategoryPolicy.prepend_mod_with('Enterprise::CategoryPolicy')
|
||||
|
||||
@@ -37,3 +37,5 @@ class PortalPolicy < ApplicationPolicy
|
||||
@record.first.members.include?(@user)
|
||||
end
|
||||
end
|
||||
|
||||
PortalPolicy.prepend_mod_with('Enterprise::PortalPolicy')
|
||||
|
||||
@@ -3,3 +3,5 @@ class ReportPolicy < ApplicationPolicy
|
||||
@account_user.administrator?
|
||||
end
|
||||
end
|
||||
|
||||
ReportPolicy.prepend_mod_with('Enterprise::ReportPolicy')
|
||||
|
||||
Reference in New Issue
Block a user