private function createTable($rights) {

        $table = [];
        foreach ($rights as $flag => $right) {
            $table[$flag] = new RightGroup($flag);
        }
        foreach ($rights as $flag => $right) {
            $this->parseRightGroup($right, $flag, $table);
        }
        return $table;
    }