public function getUsers(Result $result, $canEdit)
    {
        if (!$canEdit) {
            return [];
        }

        $repo = $this->om->getRepository('ClarolineCoreBundle:User');
        $roles = $result->getResourceNode()->getWorkspace()->getRoles()->toArray();
        $users = $repo->findUsersByRolesIncludingGroups($roles);

        return array_map(function ($user) {
            return [
                'id' => $user->getId(),
                'name' => "{$user->getFirstName()} {$user->getLastName()}",
            ];
        }, $users);
    }