williamdclt
02/25/2022, 2:52 PMdefinition user {}
/* feature flags can be enabled per organisation */
definition flag {}
/* we have multiple organisations in our system */
definition organization {
/* each organisation has multiple users */
relation member: user
/* each organisation has multiple admins */
relation admin: user
/* this represents whether this org has the new_admin_dashboard
* feature flag enabled */
relation flag_new_admin_dashboard: flag
/* to access the new admin dashboard, the user needs to be an admin and
* the org needs to have the new_admin_dashboard feature flag enabled */
permission view_new_admin_dashboard = admin & flag_new_admin_dashboard // doesn't work :(
}
I just can't seem to figure out how to implement this view_new_admin_dashboard
permission! I've been reading the docs for hours but I'm probably still missing the correct mental model, could you help me out?