chore: Add permissions to auth data (#9695)

This API change sets the foundation for an upcoming frontend update, transitioning from a role-based model to a permission-based model. This new approach will determine eligibility for various actions and UI elements based on specific permissions rather than roles, enhancing flexibility and security in user access management.
This commit is contained in:
Sojan Jose
2024-06-28 12:52:48 -07:00
committed by GitHub
parent 2c94c89077
commit 46621b0983
4 changed files with 28 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ class AccountUser < ApplicationRecord
::Agents::DestroyJob.perform_later(account, user)
end
def permissions
administrator? ? ['administrator'] : ['agent']
end
def push_event_data
{
id: id,