L
L
liteppuano2018-09-19 16:06:39
symfony
liteppuano, 2018-09-19 16:06:39

Why does $event->getController() return not an array for Sonata admin dashboard?

When accessing getController , FilterControllerEvent returns not an array with a Controller and a method, but only a controller Sonata\AdminBundle\Action\DashboardAction
But in this place it all falls down prntscr.com/kw83hr
What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Papa, 2015-04-18
Stifflera @PapaStifflera

juhomi.com/blog/2014/9/29/how-to-create-a-readonly...

S
some1else, 2015-04-18
@some1else

You are on the right track, but, apparently, you are not checking the rights correctly - you write that "I am switching to the viewer", but you yourself give the ALTER USER viewer command; - not for switching, but for editing the user. Surprisingly, this is syntactically correct - an empty list of changes. That is, in fact, you have a command something like "change user viewer <do not change anything>;". To switch to user there is
SET ROLE - www.postgresql.org/docs/9.4/static/sql-set-role.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question