public function getCustomRoleRights(ResourceNode $node)
    {
        $perms = [];

        foreach ($node->getRights() as $right) {
            //if not ROLE_ANONYMOUS nor ROLE_USER because they're added automatically in ResourceManager::createRights
            if ('ROLE_ANONYMOUS' !== $right->getRole()->getName() && 'ROLE_USER' !== $right->getRole()->getName()) {
                $rolePerms = $this->maskManager->decodeMask($right->getMask(), $node->getResourceType());
                $perms[$right->getRole()->getName()] = $rolePerms;
                $perms[$right->getRole()->getName()]['role'] = $right->getRole();
                //no implementation for rights creations yet
                $perms[$right->getRole()->getName()]['create'] = [];
            }
        }

        return $perms;
    }