public function getDropzoneUsersIds(Dropzone $dropzone)
    {
        $this->container->get('icap.manager.dropzone_voter')->isAllowToEdit($dropzone);

        //getting the ressource node
        $ressourceNode = $dropzone->getResourceNode();
        // getting the rights of the ressource node
        $rights = $ressourceNode->getRights();

        // will contain the 'authorized to open' user's ids.
        $userIds = [];
        $test = [];
        // searching for roles with the 'open' right
        foreach ($rights as $ressourceRight) {
            $role = $ressourceRight->getRole(); //  current role
            $mask = $ressourceRight->getMask(); // current mask

            // getting decoded rights.
            $decodedRights = $this->maskManager->decodeMask($mask, $ressourceNode->getResourceType());
            // if this role is allowed to open and this role is not an Admin role
            if (array_key_exists('open', $decodedRights) && true === $decodedRights['open']
                && 'ROLE_ADMIN' !== $role->getName()
            ) {
                // the role has the 'open' right
                array_push($test, $role->getName());
                $users = $role->getUsers();
                foreach ($users as $user) {
                    array_push($userIds, $user->getId());
                }
            }
        }
        $userIds = array_unique($userIds);

        return $userIds;
    }