Skip to content
Snippets Groups Projects
Commit 06818808 authored by Sebastian Kehr's avatar Sebastian Kehr :rowboat_tone2: Committed by Dorian Merz
Browse files

refs #16405 [fid] grant basic access permission on registration

parent 66460249
Branches
Tags
No related merge requests found
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
use fid\Hydrator\UserHydrator; use fid\Hydrator\UserHydrator;
use fid\InputFilter\RootAwareBaseInputFilter; use fid\InputFilter\RootAwareBaseInputFilter;
use fid\InputFilter\UserCreateFormInputFilter;
use Zend\Filter\Boolean; use Zend\Filter\Boolean;
use Zend\Filter\StringTrim; use Zend\Filter\StringTrim;
use Zend\Form\Element\Checkbox; use Zend\Form\Element\Checkbox;
...@@ -194,7 +195,7 @@ return [ ...@@ -194,7 +195,7 @@ return [
], ],
], ],
'input_filter' => [ 'input_filter' => [
'type' => RootAwareBaseInputFilter::class, 'type' => UserCreateFormInputFilter::class,
'username' => [ 'username' => [
'name' => 'username', 'name' => 'username',
'filters' => [ 'filters' => [
......
<?php
/**
* Copyright (C) 2019 Leipzig University Library
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2
*/
namespace fid\InputFilter;
class UserCreateFormInputFilter extends RootAwareBaseInputFilter
{
public function getValues()
{
$permissions = ['basic_access' => 'granted'];
return compact('permissions') + parent::getValues();
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment