Skip to content

Commit

Permalink
update seed for superuser role
Browse files Browse the repository at this point in the history
  • Loading branch information
progressbarsk committed Jul 27, 2011
1 parent 926fe1c commit 2115e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/seeds/registrations.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if defined?(User)
User.all.each do |user|
if user.plugins.where(:name => 'registrations').blank?
if user.has_role?(:superuser) && user.plugins.where(:name => 'registrations').blank?
user.plugins.create(:name => 'registrations',
:position => (user.plugins.maximum(:position) || -1) +1)
end
Expand Down

0 comments on commit 2115e5b

Please sign in to comment.