chore: Ensure privilege validations for API endpoints (#2224)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -122,7 +122,7 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def assigned_inboxes
|
||||
inboxes.where(account_id: Current.account.id)
|
||||
administrator? ? Current.account.inboxes : inboxes.where(account_id: Current.account.id)
|
||||
end
|
||||
|
||||
def administrator?
|
||||
|
||||
Reference in New Issue
Block a user