Cruft
This commit is contained in:
parent
6542ffbc19
commit
443f898ffd
1 changed files with 19 additions and 19 deletions
|
|
@ -95,33 +95,33 @@ class Screenshot < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns true if the current user has administrative permissions
|
# Returns true if the current user has administrative permissions
|
||||||
def can_admin?
|
# def can_admin?
|
||||||
self.admin == 1
|
# self.admin == 1
|
||||||
end
|
# end
|
||||||
|
|
||||||
# Returns true if the current user can upload screenshots without moderation
|
# Returns true if the current user can upload screenshots without moderation
|
||||||
def can_upload_without_moderation?
|
# def can_upload_without_moderation?
|
||||||
# Admins can upload without moderation
|
# # Admins can upload without moderation
|
||||||
true if self.can_admin
|
# true if self.can_admin
|
||||||
|
|
||||||
# Authenticated users with at least one approved screenshot
|
# # Authenticated users with at least one approved screenshot
|
||||||
#true if self.screenshots.where(approved: true).count >= 1
|
# #true if self.screenshots.where(approved: true).count >= 1
|
||||||
|
|
||||||
# Other visitors require moderation
|
# # Other visitors require moderation
|
||||||
false
|
# false
|
||||||
end
|
# end
|
||||||
|
|
||||||
# Returns true if the current user can delete screenshots
|
# Returns true if the current user can delete screenshots
|
||||||
def can_delete?
|
# def can_delete?
|
||||||
# Admins can delete screenshots
|
# # Admins can delete screenshots
|
||||||
true if self.can_admin
|
# true if self.can_admin
|
||||||
|
|
||||||
# Authenticated users with at least one approved screenshot
|
# # Authenticated users with at least one approved screenshot
|
||||||
#true if self.screenshots.where(approved: true).count >= 1
|
# #true if self.screenshots.where(approved: true).count >= 1
|
||||||
|
|
||||||
# Other visitors require moderation
|
# # Other visitors require moderation
|
||||||
false
|
# false
|
||||||
end
|
# end
|
||||||
|
|
||||||
# Return the part of the version up to the first - or +
|
# Return the part of the version up to the first - or +
|
||||||
def upstream_version
|
def upstream_version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue