#41 ✓resolved

Magic states stops also the "User" callback chain

Reported by Nando | February 14th, 2009 @ 08:24 PM

Hi Ben,

enjoying Authlogic along with Paperclip plugin I've discovered the following problem: when a magic state return false UserSession stops its callback chain but it also stops the one associated with its authenticated model (User). Maybe they both (User and UserSession) share the same CallbackChain instance?

With this behavior Authlogic does not permit (does not gives authorization) to others part of the app to do whatever they were about to do.

In my case, that prevents Paperclip to actually store the file uploaded by the user at the registration form. I can workaround my problem with a before_validation in the UserSession (and disabling magic states in order to keep my confirmed? method), but I think it deserves a ticket as is a clear "authorization vs authentication" issue (the main reason I prefer Authlogic over the other options;).

Thanks a lot in advance, Nando

Comments and changes to this ticket

  • Nando

    Nando February 16th, 2009 @ 01:18 PM

    I've been trying to reproduce my problem with a test with no success. Authlogic does NOT interfere in "User" callbacks chain.

    I've even wrote an integration test with Paperclip and it passes!.

    I guess the bug it's related with the whole environment of my app.

    Paperclip saves attachments defining an :after_save callback that in my app does not fire within the "first updating round". If Authlogic decides that "record" is valid? and calls record.save_without_session_maintenance, then, in the after_save of that "second round" the Paperclip callback function its called. If a magic state returns false that second update don't come and the function (save_attached_files) is never called.

    But in the tests I've done in a clean app things always works as expected.

    I'm very sorry for the noise. Next time I'd try to test it before creating the ticket.

  • Ben Johnson

    Ben Johnson February 16th, 2009 @ 01:37 PM

    • State changed from “new” to “resolved”

    No problem, I want to make sure Authlogic is solid and follows standard practices. If you dig deeper and find a problem please update me.


  • Richard Nicely

    Richard Nicely October 1st, 2019 @ 05:04 AM

    It is truly pride minute for the pride and bias which is praising the 200th commemoration and now I'm able to order essay uk to manage the quality work. The book is actually so amazing and has the enchantment with the goal that bunches of the individuals still love to peruse this book. It is actually so defining moment.

  • HARRY12

    HARRY12 May 2nd, 2020 @ 02:43 PM

    New web site is looking good. Thanks for the great effort. togel hari ini

  • uzair awan

    uzair awan May 12th, 2020 @ 04:47 PM

    Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. class action lawsuit lawyers

  • HARRY12

    HARRY12 May 15th, 2020 @ 04:19 PM

    I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. tiktok video downloader

  • HARRY12

    HARRY12 May 17th, 2020 @ 07:00 AM

    I needed to thank you for this phenomenal read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post. qq online terpercaya

  • HARRY12

    HARRY12 May 21st, 2020 @ 02:32 PM

    First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks. mountbatten residences

  • HARRY12

    HARRY12 May 30th, 2020 @ 03:50 AM

    • Tag set to i needed to thank you for this phenomenal read!! i unquestionably adored each and every piece of it. i have you bookmarked your site to look at the new stuff you post.

    I needed to thank you for this phenomenal read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post.

  • vishal kkamble

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket