Add Variables In Filter Permission (Legacy)

This feature allows admins or analysts to add variable {{ $user.email }} in filter permission.

Consider a company where 50 managers manage 100 different stores. Each manager can only see the stores' reports he/she manages. When managers switch stores, the admins will need to update the changes in their own system and update the permissions in Holistics system. With this feature, they only need to do that on their own system.

Consider these tables:

managers
IDEmail
1[email protected]
2[email protected]
3[email protected]
stores
Store IDName
1Girls and Boys
2French Macaron
3Fashion Factory
store_user_permissions
Store IDUser ID
11
12
21
They can create a filter permission as such:
permissions:
- if_group: Manager
then_sql:
ds_id: 25
query: select store_id from store_user_permissions SUP join managers M ON SUP.user_id = M.id where M.email = {{ $user.email }}

Notes: