Unfortunately there seems to be a problem to set the user via Basic
Auth.

In models/category.rb I added the permission guide:

  def viewable_by?(user, field)
    user.administrator?
  end

Without user authentication:
curl -i http://localhost:3000/categories/1.xml

HTTP/1.1 406 Not Acceptable
Connection: close
Date: Sun, 02 Nov 2008 11:26:47 GMT
Set-Cookie:
_hobopod_session=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
%0ASGFzaHsABjoKQHVzZWR7AA%3D
%3D--00d91bb492415cd500c924df3fa4beeae77fe932; path=/
Status: 406 Not Acceptable
Pragma: no-cache
Cache-Control: no-store
Server: Mongrel 1.1.5
Content-Type: text/html; charset=utf-8
Content-Length: 1
Expires: 0

Now with user credentials (which work in the web app):
curl -i -u niko:secret http://localhost:3000/categories/1.xml

HTTP/1.1 406 Not Acceptable
Connection: close
Date: Sun, 02 Nov 2008 11:28:13 GMT
Set-Cookie:
_hobopod_session=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
%0ASGFzaHsABjoKQHVzZWR7AA%3D
%3D--00d91bb492415cd500c924df3fa4beeae77fe932; path=/
Status: 406 Not Acceptable
Pragma: no-cache
Cache-Control: no-store
Server: Mongrel 1.1.5
Content-Type: text/html; charset=utf-8
Content-Length: 1
Expires: 0


How could I set the current user appropriately?

Thanks,
Niko
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to