public function grantAction()
    {
        $params     = $this->params();
        $request    = $this->getRequest();
        $locator    = $this->getServiceLocator();
        $groupModel = $locator->get( 'Grid\User\Model\User\Group\Model' );
        $group      = $groupModel->find( $params->fromRoute( 'id' ) );

        if ( empty( $group ) )
        {
            $this->getResponse()
                 ->setStatusCode( 404 );

            return;
        }

        if ( ! $this->getPermissionsModel()
                    ->isAllowed( $group, 'grant' ) )
        {
            $this->getResponse()
                 ->setStatusCode( 403 );

            return;
        }

        $rightModel = $locator->get( 'Grid\User\Model\User\Right\Model' );
        $rights     = $rightModel->findAllByGroup( $group->id );

        if ( $request->isPost() )
        {
            $data = $request->getPost();

            if ( isset( $data['save'] ) && ! empty( $data['rights'] ) )
            {
                foreach ( $data['rights'] as $rightId => $grant )
                {
                    $rightModel->grantToGroup( $rightId, $group->id, $grant );
                }

                $this->messenger()
                     ->add( 'user.form.grant.success',
                            'user', Message::LEVEL_INFO );

                return $this->redirect()
                            ->toRoute( 'Grid\User\GroupAdmin\List', array(
                                'locale' => (string) $this->locale(),
                            ) );
            }
        }

        return array(
            'group'     => $group,
            'rights'    => $rights,
        );
    }