Code Monkey home page Code Monkey logo

Comments (3)

rande avatar rande commented on June 1, 2024

You need to create a route sonata_user_impersonating as stated in the
documentation.

If you are a super admin, you have all permissions.

On Thu, Jan 26, 2012 at 10:30 AM, toretto <
[email protected]

wrote:

Clicking on Sonata list user action in the dashboard i get the following
exception:

An exception has been thrown during the rendering of a template
("Route "sonata_user_impersonating" does not exist.") in
SonataUserBundle:Admin:Field/impersonating.html.twig at line 15.

if i comment this instructions in
vendor/bundles/Sonata/UserBundle/Admin/Entity/UserAdmin.php:

   if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
       $listMapper
           ->add('impersonating', 'string', array('template' =>

'SonataUserBundle:Admin:Field/impersonating.html.twig'))
;
}

Everything works as expected; by the way, my admin user does not belong to
ROLE_ALLOWED_TO_SWITCH


Reply to this email directly or view it on GitHub:
#41

Thomas Rabaix

tel : +33 632 981 691 -- NOUVEAU --
fax : +33 173 769 004

from sonatauserbundle.

toretto460 avatar toretto460 commented on June 1, 2024

Thanks for the support, now is working properly.

from sonatauserbundle.

Raulken avatar Raulken commented on June 1, 2024

i have some problem
i must add route in app/config/rounting.yml?

and what i must add?this?

sonata_user_impersonating:
pattern: /
defaults: { _controller: MyBundle:Home:home }

and what i must set in "_controller" ?

when i click "impersonating user into list user of dashboard, i redirect to mylink.com/?_switch_user=Provolone_ecc...
but not work, because i have add one user without active account, but not block me, and in toolbar(bottom in app_dev) say that i'm admin and not Provolone...............................................................

my questions are two
what set in route sonata_user_impersonating: ?
and why switch_user not work? thx

PS: Sorry for my english

from sonatauserbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.