Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
class DirectoryPolicy < ApplicationPolicy
class Scope < Scope
def resolve
case user.role
when "account_manager"
scope
when "project_manager"
scope.for_project_managers
when "associate"
scope.for_associates
else
scope.none
end
end
end
def create?
true
end
def edit?
true
end
def show?
true
end
def update?
true
end
def destroy?
true
end
def new_file?
true
end
def download_file?
true
end
def destroy_file?
true
end
def can_view_permissions_settings?
user.manager? || user.account_manager?
end
end