lib/generators/fullstack/admin/templates/root/lib/support/user_subject.rb in fullstack-admin-0.2.1 vs lib/generators/fullstack/admin/templates/root/lib/support/user_subject.rb in fullstack-admin-0.2.2
- old
+ new
@@ -11,10 +11,10 @@
role :owner, :require => [:logged_in], :method => :own do |object|
object && ( object.respond_to?(:author) && ( subject_model == object.author ) ) || ( object.respond_to?(:owner) && ( subject_model == object.owner ) )
end
role :administrator, :require => :logged_in, :alias => :admin do
- subject_model.has_role?(:administrator)
+ subject_model && subject_model.is_a?(Superuser)
end
#
# Permissions
#