feat: Team APIs (#1654)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-01-17 23:56:56 +05:30
committed by GitHub
parent dd90e24d02
commit a0c33254e7
29 changed files with 523 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
class TeamMemberPolicy < ApplicationPolicy
def index?
true
end
def create?
@account_user.administrator?
end
def destroy?
@account_user.administrator?
end
end

View File

@@ -0,0 +1,21 @@
class TeamPolicy < ApplicationPolicy
def index?
true
end
def update?
@account_user.administrator?
end
def show?
true
end
def create?
@account_user.administrator?
end
def destroy?
@account_user.administrator?
end
end