public function loadRules(string $entity_id)
    {
        $records = ACLRule::get(["entity_id" => $entity_id]);
        $rules = array();
        foreach ($records as $record)
        {
            $rule = new Rule($record->entity_id, $record->role_id, $record->action, $record->policy);
            $rule->setRecord($record);
            $rules[] = $rule;
        }

        return $rules;
    }