Skip to content

Commit

Permalink
Fixes exception in change support for rules file without privilege hi…
Browse files Browse the repository at this point in the history
…erarchy (Closes stffn#15)
  • Loading branch information
stffn committed Dec 21, 2009
1 parent 907255a commit aac2336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/authorization_rules_controller.rb
Expand Up @@ -37,7 +37,7 @@ def change
@privileges = authorization_engine.auth_rules.collect {|rule| rule.privileges.to_a}.flatten.uniq
@privileges = @privileges.collect do |priv|
priv = Authorization::DevelopmentSupport::AnalyzerEngine::Privilege.for_sym(priv, authorization_engine)
(priv.descendants + priv.ancestors).map(&:to_sym)
([priv] + priv.descendants + priv.ancestors).map(&:to_sym)
end.flatten.uniq
@privileges.sort_by {|priv| priv.to_s}
@privilege = params[:privilege].to_sym rescue @privileges.first
Expand Down

0 comments on commit aac2336

Please sign in to comment.