mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 07:34:41 +08:00
Fix team permission scope for service API [SCI-9611] (#6554)
This commit is contained in:
parent
c1e3472d46
commit
e73543dd90
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue