the routes are the same, also the naming
invite_admin_users POST /admin/users/invite(.:format)
admin/users#do_invite
GET /admin/users/invite(.:format)
admin/users#invite
I had to change the permission from
def create_permitted?
# Only the initial admin user can be created
self.class.count == 0
end
to
def create_permitted?
self.class.count == 0 ||
acting_user.administrator?
end
Now the user is created and in state "invited".
Problem:
The invitation link shows the accept invitation page, but submitting it
returns the same page again, and the state does not change.
IMO the update_permitted? makes problems now:
def update_permitted?
acting_user.administrator? ||
(acting_user == self && only_changed?(:email_address,
:crypted_password,
:current_password, :password,
:password_confirmation))
# Note: crypted_password has attr_protected so although it is permitted
to change, it cannot be changed
# directly from a form submission.
end
I cannot fire out how to change this method. But maybe it is another
problem.
thanks,
Alex.
On Saturday, February 2, 2013 3:59:31 PM UTC+1, Bryan Larsen wrote:
>
> There's definitely code in the system to do that. It's certainly
> possible that it's broken -- that was the last major change made to
> Hobo 2.0.
>
> You can try changing the config.hobo.dont_emit_deprecated_routes to
> false in your config/application.rb. That will emit the old style of
> routes as well as the new style. The two sets of routes should be
> identical except for naming. If they aren't, it's definitely a bug.
>
> Bryan
>
>
> On Sat, Feb 2, 2013 at 8:04 AM, Alex Greif
> <[email protected]<javascript:>>
> wrote:
> > Hi,
> >
> > with 2.0.0pre7 just created a project with an admin subsite had to add
> the
> > following manually to the routes.rb
> >
> > namespace :admin do
> > resources :users
> > end
> >
> > maybe this can be done inside the generator.
> >
> > Alex.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "Hobo Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to [email protected] <javascript:>.
> > To post to this group, send email to [email protected]<javascript:>.
>
> > Visit this group at http://groups.google.com/group/hobousers?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.