Not everyone gets an admin account automatically.
Current approach:
The user already knows username and password of this admin account 
(included in README file). When user clicks on the login button, the 
application checks if any user with admin privileges exists. If not, 
then an account with admin privileges is setup. Admin user can change 
his/her password thereafter. On subsequent runs (when admin account is 
already exists), another admin account won't be created and there exists 
only one admin account. Also, once created the admin account can not be 
deleted.

Problem: Every time user clicks on the login button, the method to make 
admin account if no exists is called upon.

What I would like to do:
When user runs the application and no admin account exists, then display 
a signup/create admin form to create an admin account. Usually this will 
occur during first run, but not necessarily.

How can I implement this? Other suggestions are welcome..

Thanks,
Amita.


MaD wrote:
> first of all: what sense makes an admin-account if everybody gets one
> automatically?
> second: what information do you store? without having the user at
> least choose a username, password, how would you recognise which user
> is which?
> 
> i'd really want to help, but it seems i don't understand what you are
> doing here.

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to