can see and modify entity only under administrator account

3 views
Skip to first unread message

Edward Samokhvalov

unread,
Feb 3, 2010, 9:42:51 AM2/3/10
to Hobo Users
hi all!

this one is peculiar. a new entity that i've created can be access
only under admin logins and if user is not admin it shows the
following (as below)
it's strange because all other entities were created more or less the
same way and there's no such a problem.

the controllers and models are made the same way as others.
checked files permissions - also the same user.

Processing StoriesController#show (for 10.0.133.28 at 2010-02-03
16:22:56) [GET]
Parameters: {"id"=>"1-some-
stuff"}
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
core.dryml in 0.02s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_core.dryml in 0.21s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_support.dryml in 0.01s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_document_tags.dryml in 0.03s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_pages.dryml in 0.17s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_editing.dryml in 0.04s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_forms.dryml in 0.28s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_navigation.dryml in 0.03s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_plus.dryml in 0.12s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_generics.dryml in 0.02s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_lifecycles.dryml in 0.01s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_summary.dryml in 0.14s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid_user_pages.dryml in 0.18s
DRYML: Compiled /usr/lib/ruby/gems/1.8/gems/hobo-0.9.103/taglibs/
rapid.dryml in 1.25s
DRYML: Compiled app/views/taglibs/auto/rapid/cards.dryml in
0.03s
DRYML: Compiled app/views/taglibs/auto/rapid/pages.dryml in
0.41s
DRYML: Compiled app/views/taglibs/auto/rapid/forms.dryml in
0.11s
DRYML: Compiled app/views/taglibs/themes/clean/clean.dryml in
0.01s
DRYML: Compiled app/views/taglibs/application.dryml in
1.81s

NoMethodError (undefined method `user_id' for #<User:0xb6a4f5e0>):
hobo (0.9.103) lib/hobo/find_for.rb:48:in `method_missing'
app/models/story.rb:28:in `update_permitted?'
hobo (0.9.103) lib/hobo/permissions.rb:373:in `edit_permitted?'
hobo (0.9.103) lib/hobo/permissions.rb:257:in `editable_by?'
hobo (0.9.103) lib/hobo/permissions.rb:171:in `with_acting_user'
hobo (0.9.103) lib/hobo/permissions.rb:257:in `editable_by?'
hobo (0.9.103) lib/hobo/hobo_helper.rb:263:in `can_edit?'
app/views/taglibs/auto/rapid/pages.dryml:340:in
`show_page__for_story'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
app/views/taglibs/auto/rapid/pages.dryml:331:in
`show_page__for_story'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:457:in
`call'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:457:in
`override_and_call_tag'
hobo (0.9.103) lib/hobo/dryml/tag_parameters.rb:21:in
`call'
hobo (0.9.103) lib/hobo/dryml/tag_parameters.rb:21:in
`method_missing'
hobo (0.9.103) taglibs/rapid_document_tags.dryml:36:in
`header'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) taglibs/rapid_document_tags.dryml:35:in
`header'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:464:in
`send'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:464:in
`override_and_call_tag'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:427:in
`call_tag_parameter'
app/views/taglibs/auto/rapid/pages.dryml:331:in
`show_page__for_story'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
app/views/taglibs/auto/rapid/pages.dryml:330:in
`show_page__for_story'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:455:in
`call'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:455:in
`override_and_call_tag'
hobo (0.9.103) lib/hobo/dryml/tag_parameters.rb:21:in
`call'
hobo (0.9.103) lib/hobo/dryml/tag_parameters.rb:21:in
`method_missing'
hobo (0.9.103) taglibs/rapid_document_tags.dryml:21:in
`section'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) taglibs/rapid_document_tags.dryml:20:in
`section'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:464:in
`send'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:464:in
`override_and_call_tag'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:427:in
`call_tag_parameter'
hobo (0.9.103) taglibs/rapid_pages.dryml:46:in
`page_without_aaa82d3a9ca5'
hobo (0.9.103) lib/hobo/dryml/scoped_variables.rb:20:in
`new_scope'
hobo (0.9.103) taglibs/rapid_pages.dryml:38:in
`page_without_aaa82d3a9ca5'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) taglibs/rapid_pages.dryml:37:in
`page_without_aaa82d3a9ca5'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:447:in
`call'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:447:in
`override_and_call_tag'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:447:in
`override_and_call_tag'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:427:in
`call_tag_parameter'
hobo (0.9.103) taglibs/rapid_pages.dryml:37:in
`page_without_aaa82d3a9ca5'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) taglibs/rapid_pages.dryml:16:in
`page_without_aaa82d3a9ca5'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:377:in
`call'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:377:in
`call_tag_parameter_with_default_content'
hobo (0.9.103) lib/hobo/dryml/tag_parameters.rb:21:in
`call'
hobo (0.9.103) lib/hobo/dryml/tag_parameters.rb:21:in
`method_missing'
hobo (0.9.103) taglibs/core.dryml:55:in
`do_'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) taglibs/core.dryml:55:in
`do_'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:381:in
`send'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:381:in
`call_tag_parameter_with_default_content'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:403:in
`call_tag_parameter'
hobo (0.9.103) taglibs/rapid_pages.dryml:165:in
`html'
hobo (0.9.103) lib/hobo/dryml/scoped_variables.rb:20:in
`new_scope'
hobo (0.9.103) taglibs/rapid_pages.dryml:165:in
`html'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) taglibs/rapid_pages.dryml:160:in
`html'
hobo (0.9.103) taglibs/rapid_pages.dryml:16:in
`page_without_aaa82d3a9ca5'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) taglibs/rapid_pages.dryml:14:in
`page_without_aaa82d3a9ca5'
app/views/taglibs/themes/clean/clean.dryml:2:in
`page'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
app/views/taglibs/themes/clean/clean.dryml:1:in
`page'
app/views/taglibs/auto/rapid/pages.dryml:326:in
`show_page__for_story'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:328:in
`_tag_context'
app/views/taglibs/auto/rapid/pages.dryml:325:in
`show_page__for_story'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:200:in `send'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:200:in
`call_polymorphic_tag'
hobo (0.9.103) taglibs/rapid_pages.dryml:74:in `show_page'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:326:in
`_tag_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:267:in
`new_object_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:248:in
`new_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:255:in
`new_object_context'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:326:in
`_tag_context'
hobo (0.9.103) taglibs/rapid_pages.dryml:71:in `show_page'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:544:in `send'
hobo (0.9.103) lib/hobo/dryml/template_environment.rb:544:in
`render_tag'
hobo (0.9.103) lib/hobo/dryml.rb:67:in `render_tag'
hobo (0.9.103) lib/hobo/dryml/template_handler.rb:55:in
`call_dryml_tag'
hobo (0.9.103) lib/hobo/dryml/template_handler.rb:75:in
`render_for_file'
hobo (0.9.103) lib/hobo/model_controller.rb:816:in `render'
hobo (0.9.103) lib/hobo/controller.rb:23:in `call'
hobo (0.9.103) lib/hobo/controller.rb:23:in `included_in_class'
passenger (2.2.7) lib/phusion_passenger/rack/request_handler.rb:
95:in `process_request'
passenger (2.2.7) lib/phusion_passenger/abstract_request_handler.rb:
207:in `main_loop'
passenger (2.2.7) lib/phusion_passenger/railz/
application_spawner.rb:
374:in `start_request_handler'
passenger (2.2.7) lib/phusion_passenger/railz/
application_spawner.rb:
332:in `handle_spawn_application'
passenger (2.2.7) lib/phusion_passenger/utils.rb:184:in `safe_fork'
passenger (2.2.7) lib/phusion_passenger/railz/
application_spawner.rb:
330:in `handle_spawn_application'
passenger (2.2.7) lib/phusion_passenger/abstract_server.rb:352:in
`__send__'
passenger (2.2.7) lib/phusion_passenger/abstract_server.rb:352:in
`main_loop'
passenger (2.2.7) lib/phusion_passenger/abstract_server.rb:196:in
`start_synchronously'
passenger (2.2.7) lib/phusion_passenger/abstract_server.rb:163:in
`start'
passenger (2.2.7) lib/phusion_passenger/railz/
application_spawner.rb:
209:in `start'
passenger (2.2.7) lib/phusion_passenger/spawn_manager.rb:262:in
`spawn_rails_application'
passenger (2.2.7) lib/phusion_passenger/
abstract_server_collection.rb:126:in `lookup_or_add'
passenger (2.2.7) lib/phusion_passenger/spawn_manager.rb:256:in
`spawn_rails_application'
passenger (2.2.7) lib/phusion_passenger/
abstract_server_collection.rb:80:in `synchronize'
passenger (2.2.7) lib/phusion_passenger/
abstract_server_collection.rb:79:in `synchronize'
passenger (2.2.7) lib/phusion_passenger/spawn_manager.rb:255:in
`spawn_rails_application'
passenger (2.2.7) lib/phusion_passenger/spawn_manager.rb:154:in
`spawn_application'
passenger (2.2.7) lib/phusion_passenger/spawn_manager.rb:287:in
`handle_spawn_application'
passenger (2.2.7) lib/phusion_passenger/abstract_server.rb:352:in
`__send__'
passenger (2.2.7) lib/phusion_passenger/abstract_server.rb:352:in
`main_loop'
passenger (2.2.7) lib/phusion_passenger/abstract_server.rb:196:in
`start_synchronously'

thx

Matt Jones

unread,
Feb 3, 2010, 11:09:20 AM2/3/10
to hobo...@googlegroups.com
Can you post the code from your permission methods? My guess, based on
the error, is that you're trying to check ownership (via user_id ==
acting_user.id or user_is?(acting_user) ) on a model without the right
foreign key set up.

--Matt Jones

> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> 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
> .
>

kevinpfromnm

unread,
Feb 3, 2010, 12:59:24 PM2/3/10
to Hobo Users
or migration hasn't been run yet.

> ...
>
> read more »

Reply all
Reply to author
Forward
0 new messages