app/models/kryptonite/user.rb in kryptonite-0.0.9 vs app/models/kryptonite/user.rb in kryptonite-0.0.10
- old
+ new
@@ -1,9 +1,10 @@
include Kryptonite::ConfigHelper
$KRYPTONITE_USER_ACCESS_LEVEL_ADMIN = 0
$KRYPTONITE_USER_ACCESS_LEVEL_USER = 10
+$KRYPTONITE_USER_ACCESS_LEVEL_FE_USER = 20
module Kryptonite
class User < ActiveRecord::Base
def self.table_name
@@ -49,9 +50,13 @@
self.time_zone = Rails.configuration.time_zone unless self.time_zone
end
def is_admin?
access_level == $KRYPTONITE_USER_ACCESS_LEVEL_ADMIN
+ end
+
+ def is_user?
+ access_level == $KRYPTONITE_USER_ACCESS_LEVEL_USER
end
end
end