Re: [Radiant] User Registration for a School

2009-06-22 Thread Jim Gay


On Jun 22, 2009, at 2:17 AM, Petrik de Heus wrote:


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've extracted the user management part out of Ba:
http://github.com/p8/radiant-restricted-access-extension/tree/master
It's still a bit beta though:
- User registration will be added today.
- I've turned off caching to allow logged in as USERNAME links,  
otherwise cached pages would show usernames of other users.

Any ideas on how to fix this? I'm still on 0.7.1


The way we approached this with http://www.practicegreenhealth.org was  
to leave caching on and write in a controller that checks the login  
status with AJAX. That allowed us to display Welcome, Jim or   
something like that.




Petrik

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


Re: [Radiant] Extensions with 0.8

2009-06-22 Thread Jeff Casimir
Jim,

Yeah, thanks for your work on comments.  The only thing I ran into
off a checkout of Master that appeared to be a bug/missing feature was
in the comments form where it uses the tag like
if_simple_spam_filter_enabled or something -- Radiant complained
that the tag was unknown.  Given that you're working on that right
now, I'm sure I just got a version that wasn't 100% ready.  I like
that simple spam protection, though, so I just removed the conditional
and everything is great.

As far as the automation/testing plan, it would seem like a
combination of EC2 + Chef would be an ideal setup.  I have been
interested in some of that automated setup technology, so if no one
jumps on it by the time I hit  summer vacation, I'll take a look.

I'm also interested in working on more narrative documentation for
Radiant.  Right now there is a lot of great information, but some is
in the wiki, some in github pages, some in the list archives, and
there isn't necessarily a clear story.  Probably within the wiki
itself, it would be nice to walk a totally new user through the major
processes, maybe even going beyond novice and starting them into
extension customization/development.  I'm a decent Rubyist and sys
admin, and it took me some work to get everything going in the right
direction.  I'm sure there are a lot of normal users out that who
would be good community-members if we can get them started.  If anyone
has thoughts on this, I'd love to hear them.

- Jeff

PS: Postgres?  I knew you seemed like a smart guy. :)

On Mon, Jun 22, 2009 at 8:44 AM, Jim Gayj...@saturnflyer.com wrote:

 On Jun 21, 2009, at 7:30 PM, Jeff Casimir wrote:

 Jim,

 Wow, great info.  I was actually fighting with comments among others
 for a few hours, but I'm sure I made it more work than necessary.  Now
 everything is going great and I have a lot better understanding of how
 the extensions are managed and work.

 I'm maintaining comments so it's probably my fault. But let me know what you
 ran into, I made a few commits to the main repository that I shouldn't have
 pushed until I had the fixes in so you may have pulled it down in that
 window. Also, I'm integrating built-in spam filtering and other things, so
 the code is getting a lot of updates.


 It would be pretty awesome if some kind, free-time having soul were to
 implement isitradiant.com like isitjruby.com.  Especially with
 Radiant being at 0.8 and, at least from the version number, reserving
 the right to break compatibility at will, it would be awesome if there
 were a site that did nightly integration tests of all the extensions
 in the registry.  It would be tougher to do Radiant + Extension A +
 Extension B combinations, but at least Radiant + A singles would be
 really useful information.

 I would personally love to see that. I've been meaning to contact the folks
 at http://runcoderun.com/ to see if they'd have a way to do it.
 The way I think we'll need to address it for now is to have people from the
 community help test. I, for example, use PostgreSQL so I try to make sure
 that the Radiant core will pass all of those tests, wheras others use MySQL
 or SQLite and test there.


 - Jeff

 On Sun, Jun 21, 2009 at 7:20 PM, Jim Gayj...@saturnflyer.com wrote:

 On Jun 21, 2009, at 3:33 PM, Jeff Casimir wrote:

 Hi All,

 Is the expectation that unless the GitHub page specifically says that
 an extension works with 0.8, that it WON'T work?

 Maybe. It depends. Some extensions might not require an update.

 I've tried and failed to install a few extensions, and now there's so
 much non-working cruft that I'm thinking it'd be easier to start a new
 instance and transfer all my content then debug what's wrong with
 different rake tasks, migrations, etc.

 Different pages have different suggestions for installation process,
 is it more preferred to use:

 script/extension install extension_name

 or

 rake radiant:extensions:extension_name:install

 These are entirely different things.
 Using script/extension install extension_name will get information from
 the extension registry http://ext.radiantcms.org/, pull down the
 extension,
 run the migrate task, and run the update task.

 The command rake radiant:extensions:extension_name:install would just
 be
 some command to perform the install rake task (assuming it exists) in
 the
 extension extension_name

 To see what rake tasks your extensions provide, you may do rake -T from
 the root of the project.


 I've had better luck with the former, but many of the github pages
 suggest the latter.

 Using script/extension will pull down the information. This is the same
 as
 a download, git clone, svn checkout, or whatever else. script/extension
 install assumes the presence of migrate and update tasks for each
 extension and runs them.
 If you were to use some other process for getting the code (download, git
 clone, etc) you'd still need to run whatever tasks are necessary to fully
 install the extension. Some extensions need a 

Re: Re: [Radiant] Extensions with 0.8

2009-06-22 Thread Josh French

Not obvious, but Josh French has committed changes for the next
release that will allow extension developers to configure dependencies
from the extension which might help with the installation process as
far as things like error messages go. There will be more development
on this in the future.


One thing that we don't have is a way of ensuring that the proper  
version of an extension is installed from the get-go. I'm in the  
arguably bad habit of manually installing everything, so I was unaware  
of some of the problems that occur when trying to install extensions  
via script/extension or ray.


To wit, using an installer to install a 0.8-style extension will fail  
if your base Radiant install is 0.7 or earlier. Because the extension  
is checked out at its head, the environment fails and neither  
rake:migrate nor rake:update can be run until the extension is frozen  
to a compatible tag/version. This could be solved by adding a version  
argument to the install method, or by baking knowledge of the current  
Radiant version into the installer.


I've been tagging the extensions I'm involved with for compatibility  
at versions 0.7.1 and 0.8.0, but I've also been wondering if it  
wouldn't be better to maintain those via branches instead of tags --  
have a 0.7 branch to hold bugfixes, but continue new development in  
0.8 and so on.


Thoughts on how best to manage extensions across multiple, possibly  
incompatible, versions of Radiant?


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


Re: [Radiant] Extensions with 0.8

2009-06-22 Thread Jim Gay


On Jun 22, 2009, at 9:20 AM, Jeff Casimir wrote:


Jim,

Yeah, thanks for your work on comments.  The only thing I ran into
off a checkout of Master that appeared to be a bug/missing feature was
in the comments form where it uses the tag like
if_simple_spam_filter_enabled or something -- Radiant complained
that the tag was unknown.  Given that you're working on that right
now, I'm sure I just got a version that wasn't 100% ready.  I like
that simple spam protection, though, so I just removed the conditional
and everything is great.


That's my fault. David Cato did some great work on the spam filtering  
stuff, but I changed the tag name to fit in with other methods. I've  
fixed the repository now, but the problem was changing from
if_comments_use_simple_spam_filter to  
if_comments_simple_spam_filter_enabled

There will be more to come in this area.



As far as the automation/testing plan, it would seem like a
combination of EC2 + Chef would be an ideal setup.  I have been
interested in some of that automated setup technology, so if no one
jumps on it by the time I hit  summer vacation, I'll take a look.

I'm also interested in working on more narrative documentation for
Radiant.  Right now there is a lot of great information, but some is
in the wiki, some in github pages, some in the list archives, and
there isn't necessarily a clear story.  Probably within the wiki
itself, it would be nice to walk a totally new user through the major
processes, maybe even going beyond novice and starting them into
extension customization/development.  I'm a decent Rubyist and sys
admin, and it took me some work to get everything going in the right
direction.  I'm sure there are a lot of normal users out that who
would be good community-members if we can get them started.  If anyone
has thoughts on this, I'd love to hear them.

- Jeff

PS: Postgres?  I knew you seemed like a smart guy. :)

On Mon, Jun 22, 2009 at 8:44 AM, Jim Gayj...@saturnflyer.com wrote:


On Jun 21, 2009, at 7:30 PM, Jeff Casimir wrote:


Jim,

Wow, great info.  I was actually fighting with comments among  
others
for a few hours, but I'm sure I made it more work than necessary.   
Now
everything is going great and I have a lot better understanding of  
how

the extensions are managed and work.


I'm maintaining comments so it's probably my fault. But let me know  
what you
ran into, I made a few commits to the main repository that I  
shouldn't have
pushed until I had the fixes in so you may have pulled it down in  
that
window. Also, I'm integrating built-in spam filtering and other  
things, so

the code is getting a lot of updates.



It would be pretty awesome if some kind, free-time having soul  
were to

implement isitradiant.com like isitjruby.com.  Especially with
Radiant being at 0.8 and, at least from the version number,  
reserving
the right to break compatibility at will, it would be awesome if  
there

were a site that did nightly integration tests of all the extensions
in the registry.  It would be tougher to do Radiant + Extension A +
Extension B combinations, but at least Radiant + A singles  
would be

really useful information.


I would personally love to see that. I've been meaning to contact  
the folks

at http://runcoderun.com/ to see if they'd have a way to do it.
The way I think we'll need to address it for now is to have people  
from the
community help test. I, for example, use PostgreSQL so I try to  
make sure
that the Radiant core will pass all of those tests, wheras others  
use MySQL

or SQLite and test there.



- Jeff

On Sun, Jun 21, 2009 at 7:20 PM, Jim Gayj...@saturnflyer.com wrote:


On Jun 21, 2009, at 3:33 PM, Jeff Casimir wrote:


Hi All,

Is the expectation that unless the GitHub page specifically says  
that

an extension works with 0.8, that it WON'T work?


Maybe. It depends. Some extensions might not require an update.

I've tried and failed to install a few extensions, and now  
there's so
much non-working cruft that I'm thinking it'd be easier to start  
a new

instance and transfer all my content then debug what's wrong with
different rake tasks, migrations, etc.

Different pages have different suggestions for installation  
process,

is it more preferred to use:

script/extension install extension_name

or

rake radiant:extensions:extension_name:install


These are entirely different things.
Using script/extension install extension_name will get  
information from

the extension registry http://ext.radiantcms.org/, pull down the
extension,
run the migrate task, and run the update task.

The command rake radiant:extensions:extension_name:install  
would just

be
some command to perform the install rake task (assuming it  
exists) in

the
extension extension_name

To see what rake tasks your extensions provide, you may do rake - 
T from

the root of the project.



I've had better luck with the former, but many of the github pages
suggest the latter.


Using script/extension will pull down the 

Re: [Radiant] User Registration for a School

2009-06-22 Thread Jim Gay
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 +


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®.

RE: [Radiant] User Registration for a School

2009-06-22 Thread Merk S

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: 
  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.0 (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 +
 
 
  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: 
  

RE: [Radiant] User Registration for a School

2009-06-22 Thread Merk S

Sean,

no_login_required worked!  thank you sir!



 Date: Mon, 22 Jun 2009 20:30:00 -0400
 From: seancri...@gmail.com
 To: radiant@radiantcms.org
 Subject: Re: [Radiant] User Registration for a School
 
 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: 
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.0 (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 +
 
 
  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 

Re: [Radiant] User Registration for a School

2009-06-22 Thread Sean Cribbs
Yes, rename them (making sure to change any references to them 
elsewhere).  And I suggest making a parent controller for any of your 
controllers that use your generated auth that contains the 
'no_login_required' line and includes AuthenticatedSystem.


Sean

Merk S wrote:
Sean, 


One follow up question:

I do in fact have the following methods in AuthenticatedSystem:
 - logged_in?
 - login_required

To prevent future problems, should i simply rename them?

  

Date: Mon, 22 Jun 2009 20:30:00 -0400
From: seancri...@gmail.com
To: radiant@radiantcms.org
Subject: Re: [Radiant] User Registration for a School

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: 
  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.0 (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 +


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