pub async fn max_permission_level( ctx: &AppCtx, ref_id: Uuid, ) -> Result<Option<PermissionLevel>, AppError>
Gets the highest level of permissions allowed for a ref.