Giter Site home page Giter Site logo

Comments (11)

hacfi avatar hacfi commented on June 29, 2024

@sidux That doesn’t sound like an issue with JMSSecurityExtra or this bundle.

If you’re using SensioFrameworkExtraBundle you can return an array in the controller if that action has a @Template annotation but otherwise you always have to return an instance of Symfony\Component\HttpFoundation\Response in your controller.

from controllerextrabundle.

sidux avatar sidux commented on June 29, 2024

I am using the annotation @JsonResponse of this bundle.

from controllerextrabundle.

hacfi avatar hacfi commented on June 29, 2024

Oops..I must have been a bit tired! After having another look at the code of both this bundle and JMSSecurityExtraBundle I’m surprised they interfere with each other.

Let’s see what @mmoreram knows about this.

from controllerextrabundle.

mmoreram avatar mmoreram commented on June 29, 2024

@sidux @hacfi Hmmm, interesting... Let me test it. This must be something about jsonResponse event priority. Right now is subscribed to the kernel.reponse event with priority -128, maybe there is some kind of collision here.

from controllerextrabundle.

mmoreram avatar mmoreram commented on June 29, 2024

@sidux Btw, can you post your controller with annotations right here please?

from controllerextrabundle.

hacfi avatar hacfi commented on June 29, 2024

Afaik JMSSecurityExtraBundle doesn’t use the kernel.view event at all. It deals with the authentication much earlier.

from controllerextrabundle.

mmoreram avatar mmoreram commented on June 29, 2024

Sorry, I am also tired XD I meant kernel.view XD

from controllerextrabundle.

sidux avatar sidux commented on June 29, 2024
    /**
     * @Route("/access/{event}")
     * @Secure("ROLE_ADMIN")
     * @Method("POST")
     * @JsonResponse
     *
     * @param Request $request
     * @param Event      $event
     *
     * @return array
     */
    public function giveAccess(Request $request, Event $event) {}

when i remove the @Secure annotation everything works fine.

from controllerextrabundle.

mmoreram avatar mmoreram commented on June 29, 2024

Challange accepted! :)

from controllerextrabundle.

mmoreram avatar mmoreram commented on June 29, 2024

@sidux ping! Still failing?

from controllerextrabundle.

sidux avatar sidux commented on June 29, 2024

Hi,
i don't use JMSSecurityExtraBundle anymore, replaced it with SensioFrameworkExtraBundle and it works fine 👍

from controllerextrabundle.

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.