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
be1ee842
Commit
be1ee842
authored
Mar 22, 2019
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BO : add page(s) admin + fix role admin for super admin
parent
37824fac
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
15 deletions
+18
-15
services.yaml
config/services.yaml
+2
-2
AdherentAdmin.php
src/Admin/AdherentAdmin.php
+0
-1
GroupAdmin.php
src/Application/Sonata/UserBundle/Admin/GroupAdmin.php
+2
-0
UserAdmin.php
src/Application/Sonata/UserBundle/Admin/UserAdmin.php
+13
-11
Flux.php
src/Entity/Flux.php
+1
-1
No files found.
config/services.yaml
View file @
be1ee842
...
@@ -355,8 +355,8 @@ services:
...
@@ -355,8 +355,8 @@ services:
tags
:
tags
:
-
name
:
sonata.admin
-
name
:
sonata.admin
manager_type
:
orm
manager_type
:
orm
group
:
"
Pages
"
group
:
"
Import
"
label
:
"
Pages
"
label
:
"
Import
"
show_mosaic_button
:
false
show_mosaic_button
:
false
public
:
true
public
:
true
...
...
src/Admin/AdherentAdmin.php
View file @
be1ee842
...
@@ -12,7 +12,6 @@ use App\Enum\MoyenEnum;
...
@@ -12,7 +12,6 @@ use App\Enum\MoyenEnum;
use
FOS\UserBundle\Event\FilterUserResponseEvent
;
use
FOS\UserBundle\Event\FilterUserResponseEvent
;
use
FOS\UserBundle\FOSUserEvents
;
use
FOS\UserBundle\FOSUserEvents
;
use
Knp\Menu\ItemInterface
as
MenuItemInterface
;
use
Knp\Menu\ItemInterface
as
MenuItemInterface
;
use
Knp\Menu\ItemInterface
;
use
Sonata\AdminBundle\Admin\AbstractAdmin
;
use
Sonata\AdminBundle\Admin\AbstractAdmin
;
use
Sonata\AdminBundle\Admin\AdminInterface
;
use
Sonata\AdminBundle\Admin\AdminInterface
;
use
Sonata\AdminBundle\Datagrid\DatagridMapper
;
use
Sonata\AdminBundle\Datagrid\DatagridMapper
;
...
...
src/Application/Sonata/UserBundle/Admin/GroupAdmin.php
View file @
be1ee842
...
@@ -21,8 +21,10 @@ class GroupAdmin extends BaseGroupAdmin
...
@@ -21,8 +21,10 @@ class GroupAdmin extends BaseGroupAdmin
protected
function
configureRoutes
(
RouteCollection
$collection
)
protected
function
configureRoutes
(
RouteCollection
$collection
)
{
{
$subject
=
$this
->
getSubject
();
$subject
=
$this
->
getSubject
();
if
(
$subject
!=
null
&&
!
(
$subject
->
isGranted
(
'ROLE_SUPER_ADMIN'
)
||
$subject
->
isGranted
(
'ROLE_ADMIN_SIEGE'
)))
{
$collection
->
clearExcept
(
'list'
);
$collection
->
clearExcept
(
'list'
);
}
}
}
public
function
getBatchActions
()
public
function
getBatchActions
()
{
{
...
...
src/Application/Sonata/UserBundle/Admin/UserAdmin.php
View file @
be1ee842
...
@@ -213,7 +213,8 @@ class UserAdmin extends BaseUserAdmin
...
@@ -213,7 +213,8 @@ class UserAdmin extends BaseUserAdmin
if
(
$subject
->
isGranted
(
'ROLE_COMPTOIR'
)
&&
!
empty
(
$subject
->
getComptoirsgere
()))
{
if
(
$subject
->
isGranted
(
'ROLE_COMPTOIR'
)
&&
!
empty
(
$subject
->
getComptoirsgere
()))
{
$hideOrShowComptoir
=
[];
$hideOrShowComptoir
=
[];
}
}
$formMapper
->
with
(
'Groups'
)
$formMapper
->
with
(
'Groups'
)
->
add
(
'groups'
,
ModelType
::
class
,
[
->
add
(
'groups'
,
ModelType
::
class
,
[
'required'
=>
false
,
'required'
=>
false
,
'expanded'
=>
true
,
'expanded'
=>
true
,
...
@@ -231,17 +232,18 @@ class UserAdmin extends BaseUserAdmin
...
@@ -231,17 +232,18 @@ class UserAdmin extends BaseUserAdmin
'attr'
=>
$hideOrShowComptoir
,
'attr'
=>
$hideOrShowComptoir
,
'label_attr'
=>
$hideOrShowComptoir
,
'label_attr'
=>
$hideOrShowComptoir
,
])
])
->
end
();
->
end
()
$formMapper
->
end
();
->
with
(
'Roles'
)
->
add
(
'realRoles'
,
SecurityRolesType
::
class
,
[
'label'
=>
'form.label_roles'
,
'expanded'
=>
true
,
'multiple'
=>
true
,
'required'
=>
false
,
])
->
end
()
->
end
()
;
}
}
// ->with('Roles')
// ->add('realRoles', SecurityRolesType::class, [
// 'label' => 'form.label_roles',
// 'expanded' => true,
// 'multiple' => true,
// 'required' => false,
// ])
// ->end()
// ->with('Keys')
// ->with('Keys')
// ->add('token', null, ['required' => false])
// ->add('token', null, ['required' => false])
// ->add('twoStepVerificationCode', null, ['required' => false])
// ->add('twoStepVerificationCode', null, ['required' => false])
...
...
src/Entity/Flux.php
View file @
be1ee842
...
@@ -267,7 +267,7 @@ abstract class Flux
...
@@ -267,7 +267,7 @@ abstract class Flux
$em
=
$event
->
getEntityManager
();
$em
=
$event
->
getEntityManager
();
$flux
->
getExpediteur
()
->
setCompte
(
$compteExp
);
$flux
->
getExpediteur
()
->
setCompte
(
$compteExp
);
$em
->
persist
(
$flux
->
getExpediteur
());
$em
->
persist
(
$flux
->
getExpediteur
());
if
(
$
this
->
getParenttype
()
!=
'vente'
)
{
if
(
$
flux
->
getParenttype
()
!=
'vente'
)
{
$compteDest
=
$flux
->
getDestinataire
()
->
getCompte
()
+
$flux
->
getMontant
();
$compteDest
=
$flux
->
getDestinataire
()
->
getCompte
()
+
$flux
->
getMontant
();
$flux
->
getDestinataire
()
->
setCompte
(
$compteDest
);
$flux
->
getDestinataire
()
->
setCompte
(
$compteDest
);
$em
->
persist
(
$flux
->
getDestinataire
());
$em
->
persist
(
$flux
->
getDestinataire
());
...
...
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