Permalink
Browse files

update seed for superuser role

  • Loading branch information...
1 parent 926fe1c commit 2115e5b3488a52745e2b045ed7cb1384ef4f07cc progressbarsk committed Jul 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 db/seeds/registrations.rb
@@ -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

0 comments on commit 2115e5b

Please sign in to comment.