Where is the Flag for initial user set

16 views
Skip to first unread message

jhstephenson

unread,
Apr 21, 2012, 5:36:03 PM4/21/12
to hobo...@googlegroups.com
Somehow the application I am working on thinks that the initial user has already been set. I took a copy of the app home to work on and the original did have one set. But on my home computer, after cloning the app, it think that I have already set the administrator user and password.

How do I reset the application so that it prompt me for the initial user/administrator?

Jim

Bryan Larsen

unread,
Apr 21, 2012, 5:37:43 PM4/21/12
to hobo...@googlegroups.com
The "initial user set" flag is not a flag, it is just "Users.count >
0". So if you really want to reset it, just remove all your users.
:)

cheers,
Bryan

> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/nFR6uQg1LtQJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.

jhstephenson

unread,
Apr 21, 2012, 6:14:43 PM4/21/12
to hobo...@googlegroups.com
That is interesting. There are no records in the Users file.

Jim


On Saturday, April 21, 2012 3:37:43 PM UTC-6, Bryan Larsen wrote:
The "initial user set" flag is not a flag, it is just "Users.count >
0".   So if you really want to reset it, just remove all your users.
:)

cheers,
Bryan


On Sat, Apr 21, 2012 at 5:36 PM, jhstephenson <jste...@scc-i.com> wrote:
> Somehow the application I am working on thinks that the initial user has
> already been set. I took a copy of the app home to work on and the original
> did have one set. But on my home computer, after cloning the app, it think
> that I have already set the administrator user and password.
>
> How do I reset the application so that it prompt me for the initial
> user/administrator?
>
> Jim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/nFR6uQg1LtQJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to

> hobousers+unsubscribe@googlegroups.com.

jhstephenson

unread,
Apr 21, 2012, 6:42:26 PM4/21/12
to hobo...@googlegroups.com
The front page of the app seems to know that there aren't any records in the User table because it has the message:

There are no user accounts - please provide the details of the site administrator

But the fields to enter the administrator do not show up.

Bryan Larsen

unread,
Apr 21, 2012, 6:45:39 PM4/21/12
to hobo...@googlegroups.com
Have you modified the permissions or the lifecycle for the user model?

Bryan

>>> > hobousers+...@googlegroups.com.


>>> > For more options, visit this group at
>>> > http://groups.google.com/group/hobousers?hl=en.
>

> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/hobousers/-/Cjq48w9BSNgJ.


>
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to

> hobousers+...@googlegroups.com.

jhstephenson

unread,
Apr 21, 2012, 7:16:26 PM4/21/12
to hobo...@googlegroups.com
Ok. The problem is that in the Rapid Rails 3 with Hobo tutorial, on page 229 it says to change the permissions for create_permitted to acting_user.administrator?. It should probably say "    acting_user.administrator? ||     self.class.count == 0"

Once I changed it to that it worked just fine.

Jim

>>> > hobousers+unsubscribe@googlegroups.com.


>>> > For more options, visit this group at
>>> > http://groups.google.com/group/hobousers?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/Cjq48w9BSNgJ.
>
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to

> hobousers+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages