jebw
2007-Nov-27 16:04 UTC
Bizarre interaction problem between acts_as_authenticated and a flash mp3 player
I''m getting an odd problem where a flash movie (a simple mp3 player) does not load up correctly if a user is not logged in with an admin role. I''m using Acts As Authenticated and RoleRequirement plugins. After a day of debugging, this problem appears to be linked to the following code in acts as authenticated. def self.included(base) base.send :helper_method, :current_user, :logged_in? end The flash file is just held in public, and whilst it does load it shows incorrectly and wont play any mp3 files - works fine when logged in as an admin (and yes its not access rights on the mp3 files). Has anyone else encountered any odd behaviour like this, I''m at a loss. Neither the View nor Layout code contain references to current_user or logged_in? functions, I''ve also commented out all references to require_role and login_required in the controllers and parent ApplicationController. Thanks jebw --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jebw
2007-Nov-27 16:50 UTC
Re: Bizarre interaction problem between acts_as_authenticated and a flash mp3 player
Follow up for anyone interested. The reason I could find the issue was I was looking at the wrong request! The page was loading fine, but jw mp3player was calling back to the url of the page its in with the last part replace by ''playlist'' eg if its in /mycontroller/myaction/myid the flash movie then makes a call to /mycontroller/myaction/playlist which didn''t exist but the resulting behaviour changed depending on whether a user was an admin or not. In the end it had nothing to do with Acts As Authenticated or RoleRequirement, they just confused the issue. cheers jebw On Nov 27, 4:04 pm, jebw <jebwilk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m getting an odd problem where a flash movie (a simple mp3 player) > does not load up correctly if a user is not logged in with an admin > role. I''m using Acts As Authenticated and RoleRequirement plugins. > After a day of debugging, this problem appears to be linked to the > following code in acts as authenticated. > > def self.included(base) > base.send :helper_method, :current_user, :logged_in? > end > > The flash file is just held in public, and whilst it does load it > shows incorrectly and wont play any mp3 files - works fine when logged > in as an admin (and yes its not access rights on the mp3 files). > > Has anyone else encountered any odd behaviour like this, I''m at a > loss. Neither the View nor Layout code contain references to > current_user or logged_in? functions, I''ve also commented out all > references to require_role and login_required in the controllers and > parent ApplicationController. > > Thanks > > jebw--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---