mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add power_user? method to User model
This commit is contained in:
@@ -18,4 +18,8 @@ class User < ApplicationRecord
|
||||
gravatar_id = Digest::MD5::hexdigest(email.downcase)
|
||||
"https://secure.gravatar.com/avatar/#{gravatar_id}"
|
||||
end
|
||||
|
||||
def power_user?
|
||||
role == 'admin' || role == 'moderator'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user