Added welcome and profile actions to the my controller

This commit is contained in:
Christoph Haas 2017-04-23 13:37:48 +02:00
parent 8e4dd058b6
commit 020a864736
12 changed files with 125 additions and 19 deletions

View file

@ -113,4 +113,9 @@ class Screenshot < ApplicationRecord
def self.uploaded_by(token)
self.where(approved: false, uploaderhash: token)
end
# Check whether the user has administrative permissions
def can_admin?
self.admin == 1
end
end