app/models/user.rb in aleph_analytics-0.1.0 vs app/models/user.rb in aleph_analytics-0.2.0
- old
+ new
@@ -14,6 +14,10 @@
serialize :groups
def self.guest_user
where(email: 'guest-user@test.com', role: Role::ADMIN_ROLE, name: 'Guest').first_or_create
end
+
+ def admin?
+ role == Role::ADMIN_ROLE
+ end
end