Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error when calling /authorization_rules #186

Open
bvogel opened this issue Sep 9, 2013 · 0 comments
Open

Runtime error when calling /authorization_rules #186

bvogel opened this issue Sep 9, 2013 · 0 comments

Comments

@bvogel
Copy link

bvogel commented Sep 9, 2013

Running declarative_authorization 0.5.7 on ruby 1.9.3p448 with rails 3.2.13 I get the following stack trace

RuntimeError - Result does not have a type in front: s(s(:lit, :articles), s(:hash, s(:lit, :includes), s(:array, s(:lit, :view_prices), s(:lit, :change_state), s(:lit, :skip_production)))):
  sexp_processor (4.2.1) lib/sexp_processor.rb:239:in `block in process'
  sexp_processor (4.2.1) lib/sexp_processor.rb:340:in `in_context'
  sexp_processor (4.2.1) lib/sexp_processor.rb:194:in `process'
  declarative_authorization (0.5.7) lib/declarative_authorization/development_support/analyzer.rb:161:in `process_iter'
  sexp_processor (4.2.1) lib/sexp_processor.rb:218:in `block (2 levels) in process'
  sexp_processor (4.2.1) lib/sexp_processor.rb:275:in `error_handler'
  sexp_processor (4.2.1) lib/sexp_processor.rb:217:in `block in process'
  sexp_processor (4.2.1) lib/sexp_processor.rb:340:in `in_context'
  sexp_processor (4.2.1) lib/sexp_processor.rb:194:in `process'
  sexp_processor (4.2.1) lib/sexp_processor.rb:236:in `block (2 levels) in process'
  sexp_processor (4.2.1) lib/sexp_processor.rb:275:in `error_handler'
  sexp_processor (4.2.1) lib/sexp_processor.rb:235:in `block in process'
  sexp_processor (4.2.1) lib/sexp_processor.rb:340:in `in_context'
  sexp_processor (4.2.1) lib/sexp_processor.rb:194:in `process'
  declarative_authorization (0.5.7) lib/declarative_authorization/development_support/analyzer.rb:152:in `analyze'
  declarative_authorization (0.5.7) lib/declarative_authorization/development_support/analyzer.rb:29:in `block in analyze'
  declarative_authorization (0.5.7) lib/declarative_authorization/development_support/analyzer.rb:28:in `analyze'
  declarative_authorization (0.5.7) app/helpers/authorization_rules_helper.rb:27:in `policy_analysis_hints'
  declarative_authorization (0.5.7) app/views/authorization_rules/index.html.erb:16:in `___sers_bvogel__rvm_gems_ruby_______p____gems_declarative_authorization_______app_views_authorization_rules_index_html_erb__903524250580251314_70174496351320'

The corresponding part of autorization_rules.rb is this:

privileges do
  privilege :manage do
    includes :create, :new, :edit, :update, :destroy
  end
  privilege :view do
    includes :index, :show
  end
  privilege :manage, :articles, includes: [:view_prices, :change_state, :skip_production]
end

authorization do
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant