Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-mlc
kohinos
Commits
23cd4354
Commit
23cd4354
authored
Mar 05, 2019
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug => can delete user
parent
050e1ad7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
UserAdmin.php
src/Application/Sonata/UserBundle/Admin/UserAdmin.php
+11
-0
No files found.
src/Application/Sonata/UserBundle/Admin/UserAdmin.php
View file @
23cd4354
...
...
@@ -20,6 +20,7 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper;
use
Sonata\AdminBundle\Datagrid\ListMapper
;
use
Sonata\AdminBundle\Form\FormMapper
;
use
Sonata\AdminBundle\Form\Type\ModelType
;
use
Sonata\AdminBundle\Route\RouteCollection
;
use
Sonata\AdminBundle\Show\ShowMapper
;
use
Sonata\CoreBundle\Form\Type\DatePickerType
;
use
Sonata\UserBundle\Admin\Model\UserAdmin
as
BaseUserAdmin
;
...
...
@@ -39,6 +40,16 @@ class UserAdmin extends BaseUserAdmin
$this
->
setTemplate
(
'edit'
,
'@SonataAdmin/base_edit.html.twig'
);
}
protected
function
configureRoutes
(
RouteCollection
$collection
)
{
if
(
$this
->
isChild
())
{
$collection
->
remove
(
'delete'
);
return
;
}
// This is the route configuration as a parent
$collection
->
remove
(
'delete'
);
}
/**
* {@inheritdoc}
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment