{"action":"created","issue":{"url":"https://api.github.com/repos/Hobo/hobo/issues/149","labels_url":"https://api.github.com/repos/Hobo/hobo/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/Hobo/hobo/issues/149/comments","events_url":"https://api.github.com/repos/Hobo/hobo/issues/149/events","html_url":"https://github.com/Hobo/hobo/issues/149","id":66116992,"number":149,"title":"Regression in creator action","user":{"login":"haslinger","id":1116624,"avatar_url":"https://avatars.githubusercontent.com/u/1116624?v=3","gravatar_id":"","url":"https://api.github.com/users/haslinger","html_url":"https://github.com/haslinger","followers_url":"https://api.github.com/users/haslinger/followers","following_url":"https://api.github.com/users/haslinger/following{/other_user}","gists_url":"https://api.github.com/users/haslinger/gists{/gist_id}","starred_url":"https://api.github.com/users/haslinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haslinger/subscriptions","organizations_url":"https://api.github.com/users/haslinger/orgs","repos_url":"https://api.github.com/users/haslinger/repos","events_url":"https://api.github.com/users/haslinger/events{/privacy}","received_events_url":"https://api.github.com/users/haslinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-03T09:44:11Z","updated_at":"2015-04-24T15:41:43Z","closed_at":null,"body":"I'm quite sure, that there is a regression in the latest changes to the creator actions. I have the latest github version checked out:\r\n```ruby\r\nclass Conversation\r\n...\r\n  lifecycle do\r\n    state :active, default: true\r\n    create :initiate, become: :active, available_to: :all, new_key: true, params: [:name]\r\n...\r\n  end\r\n...\r\n  def create_permitted?\r\n    true\r\n  end\r\n\r\n  def view_permitted?(field)\r\n    customer_is?(acting_user)\r\n  end\r\n```\r\n\r\nand suddenly in the creation method call get \r\n\r\n``` \r\nException: #<Hobo::PermissionDeniedError: Hobo::PermissionDeniedError>\r\nparams:\r\n{\"page_path\"=>\"/conversations/initiate\",\r\n \"authenticity_token\"=>\"flP2yp17m8GBm+mMNtUCaa5Kpvgqb42S7e4wDojCi3A=\",\r\n \"conversation\"=>\r\n  {\"customer_id\"=>\"1376\",\r\n   \"name\"=>\"Bitten rufen Sie mich zurück, meine Telefonnummer ist:\"},\r\n \"action\"=>\"do_initiate\",\r\n \"controller\"=>\"conversations\"}\r\n```\r\nwhereas in Hobo 2.1.1 it's still working fine.\r\nI have to extend view permissions to \r\n``` \r\n  def view_permitted?(field)\r\n    customer_is?(acting_user) ||\r\n    new_record?\r\n  end\r\n```\r\nwhich is fine for me, but I assume, it will break some people's code..."},"comment":{"url":"https://api.github.com/repos/Hobo/hobo/issues/comments/95970707","html_url":"https://github.com/Hobo/hobo/issues/149#issuecomment-95970707","issue_url":"https://api.github.com/repos/Hobo/hobo/issues/149","id":95970707,"user":{"login":"stevemadere","id":4029925,"avatar_url":"https://avatars.githubusercontent.com/u/4029925?v=3","gravatar_id":"","url":"https://api.github.com/users/stevemadere","html_url":"https://github.com/stevemadere","followers_url":"https://api.github.com/users/stevemadere/followers","following_url":"https://api.github.com/users/stevemadere/following{/other_user}","gists_url":"https://api.github.com/users/stevemadere/gists{/gist_id}","starred_url":"https://api.github.com/users/stevemadere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevemadere/subscriptions","organizations_url":"https://api.github.com/users/stevemadere/orgs","repos_url":"https://api.github.com/users/stevemadere/repos","events_url":"https://api.github.com/users/stevemadere/events{/privacy}","received_events_url":"https://api.github.com/users/stevemadere/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T15:41:43Z","updated_at":"2015-04-24T15:41:43Z","body":"This was caused by my PR #147 \r\n\r\nI mistakenly assumed that **HoboModel#user_new** was just like\r\n**ActiveModel#new** but with the addition of a call to **set_creator()** .\r\n\r\nI now see that it also invokes **user_view** for some reason.\r\n\r\nI will submit another PR to fix this.\r\n"}}