There's likely a name-collision between Radiant's internal authentication and your generated restful_authentication. Try first adding this to the top of your controller:

no_login_required

Then make sure you don't have methods in AuthenticatedSystem that have the same names as the Radiant ones. Likely suspects: logged_in?, login_required, current_user.

Sean

Merk S wrote:
Hi Jim,

I do have a homepage that is published and working fine when i access it 
directly from http://localhost


Looking in the server output again, i realized that i missed this the first 
time around:

Processing SiteusersController#new (for 127.0.0.1 at 2009-06-22 17:09:34) [GET]
  Session ID: XXXX
  Parameters: {"action"=>"new", "controller"=>"siteusers"}
Redirected to http://localhost:3000/admin/login
Filter chain halted as [:authenticate] rendered_or_redirected.
Completed in 0.00089 (1118 reqs/sec) | DB: 0.00000 (0%) | 302 Found 
[http://localhost/register]



I think this is a result of a conflict with the authenticate method in Radiant's /lib/login_system.rb (as you previously mentioned i should look out for)
I guess my question is now: Is there an elegant way to work around this 
situation?

thanks!




From: j...@saturnflyer.com
To: radiant@radiantcms.org
Subject: Re: [Radiant] User Registration for a School
Date: Mon, 22 Jun 2009 19:59:44 -0400

If you have no Home page defined Radiant will redirect you to the admin login. Perhaps that's it. Do you have a published home page?

On Jun 22, 2009, at 7:12 PM, Merk S wrote:

Having a strange issue, maybe someone knows why?

Got restful_authentication in and authenticating.

The issue i'm having is that when i try to access my site.com/ register i am forced to log into the Admin before i can access the page. Once i log into the admin site.com/register loads correctly.

Same applies to /login and /logout.

I should note that I am using the share_layouts extension.


Here are my routes:
 define_routes do |map|
   map.resources :siteusers
   map.resource  :sitesession
map.register '/register', :controller => 'siteusers', :action => 'new' map.sitelogin '/sitelogin', :controller => 'sitesessions', :action => 'new' map.sitelogout '/sitelogout', :controller => 'sitesessions', :action => 'destroy'
 end

This is the output of 'rake routes'

rake routes | grep register
register /register {:controller=>"siteusers", :action=>"new"}

rake routes | grep sitelogin
sitelogin /sitelogin {:controller=>"sitesessions", :action=>"new"}

rake routes | grep sitelogout
sitelogout /sitelogout {:controller=>"sitesessions", :action=>"destroy"}


thank you!

From: d0...@hotmail.com
To: radiant@radiantcms.org
Subject: RE: [Radiant] User Registration for a School
Date: Mon, 22 Jun 2009 06:51:23 +0000


Ah yes thank you.  Probably would have bumped into that.

I suppose i can get around this pretty easily by doing restful_authentication generation with "siteuser" rather than "user".

I think this is still poignant and should avoid issue.



From: j...@saturnflyer.com
To: radiant@radiantcms.org
Subject: Re: [Radiant] User Registration for a School
Date: Sun, 21 Jun 2009 19:26:56 -0400

If restful authentication works for you, it should be fine. You'll
just need to make sure that any of the methods for authentication
don't overlap.
http://github.com/radiant/radiant/blob/69cdd08d287199810fa515c04a3563e26acfb11c/lib/login_system.rb

Jim Gay
http://www.saturnflyer.com



On Jun 21, 2009, at 4:21 PM, Merk S wrote:

Jim, thanks a lot for your input.

I'm considering restful-authentication -- do you think using
something like that (or authlogic) is overkill or might cause
problems?

I do like the fact that out of the box RA supports roles and states :)

thanks again jim.

From: j...@saturnflyer.com
To: radiant@radiantcms.org
Subject: Re: [Radiant] User Registration for a School
Date: Sun, 21 Jun 2009 08:15:36 -0400

On Jun 20, 2009, at 2:17 PM, Merk S wrote:

Dear Radiant Folks,I am working on a website for a martial arts
studio where families/guardians register their children for
classes.  By hacking on a fork of the fantastic
simple_product_manager extension 
(http://github.com/rubymn-f1/radiant-simple-product-manager/tree/master
) I've been able to account for all of the classes and such.

I am now at the point where I'm trying to implement a user system to
manage families, and their children, aka the students enrolled in
Karate classes. These students all have different attributes that I would assume could just be part of a "profile" and they belong to a primary care giver who could also be referred to as their "Family".

I am wondering if anyone has some suggestions for how I might do
this?

I have thought about the following options:
- Extend Radiant's User model and some how support users belonging
to each other.  i.e. a Parent user might own a child user
- Create a parallel and super simple user system separate from
Radiant's users
- Use something like Spanner's reader extension: 
http://github.com/spanner/radiant-reader-extension/tree/master
in combination with Spanner's reader_group extension: 
http://github.com/spanner/radiant-reader_group-extension/tree/master
.  Group could be the Parental/Guardian and "reader" could be the
student
- Give up ( jk :) )

Thank you for reading this huge post.
I haven't looked closely at the extensions out there for member
management. I believe that a common approach is to just piggy- back on the existing users, but personally I would not do that. The purpose
of
Radiant's users and your extra users are different enough that they
make sense being separate, and you'd also control that better by
rolling your own authentication scheme. I think Ba does this 
(http://github.com/aslakhellesoy/ba/tree/master
)

I don't think that gives you an answer, but that's my opinion.

-Jim

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to