Files
old-holivud2/app/policies/material_release_policy.rb

50 lines
519 B
Ruby
Raw Normal View History

2020-05-31 22:38:19 +02:00
class MaterialReleasePolicy < ReleasePolicy
def create?
true
end
def show?
true
end
def update?
!record.native?
end
def index?
true
end
def destroy?
2020-06-26 18:45:11 +02:00
user.manager? || user.account_manager?
2020-05-31 22:38:19 +02:00
end
2020-09-01 17:15:16 +02:00
def edit_files?
2020-05-31 22:38:19 +02:00
true
end
2020-09-01 17:15:16 +02:00
def update_files?
edit_files?
end
2020-05-31 22:38:19 +02:00
def update_photos?
2020-09-01 17:15:16 +02:00
edit_files?
2020-05-31 22:38:19 +02:00
end
def tag_multiple?
true
end
def download_multiple?
true
end
2020-07-20 13:28:40 +00:00
def review?
user.account_manager?
end
def approve?
review?
end
2020-05-31 22:38:19 +02:00
end