How to manually set the acting_user

10 views
Skip to first unread message

brettnem

unread,
Sep 19, 2012, 12:00:06 PM9/19/12
to hobo...@googlegroups.com
Hello,

New to hobo, so I hope this isn't a terribly obvious question. I've made an "api" controller that can perform certain functions based on RESTful requests. With permissions opened wide, it works just like I'd like it. However, I can't seem to tweak the permissions how I'd like. Basically in the API call, a "API key" is passed. My api_controller logic checks this and that works great. But once I enable hobo's permissions, it doesn't work. I suspect it's because there isn't a logged in user sending the request. Since I validate the API key, how can I manually tell the backend that "I'm sure this is coming from user X".

Thanks,
Brett

Bryan Larsen

unread,
Sep 19, 2012, 12:05:02 PM9/19/12
to hobo...@googlegroups.com
Set self.current_user in your controller.

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/-/sFAFxw4FHOYJ.
> 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.
Reply all
Reply to author
Forward
0 new messages