Fix team permission scope for service API [SCI-9611] (#6554)

This commit is contained in:
ajugo 2023-10-30 12:54:55 +01:00 committed by GitHub
parent c1e3472d46
commit e73543dd90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,7 @@ module Api
def load_team
@team = current_user.teams.find(params.require(:team_id))
current_user.permission_team = @team
raise PermissionError.new(Team, :read) unless can_read_team?(@team)
end