Browse Source

FIX 开放平台管理员可以访问所有团队信息

tags/v3.0.2
jasder 5 years ago
parent
commit
dcd4457cf5
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/organizations/base_controller.rb

+ 2
- 2
app/controllers/organizations/base_controller.rb View File

@@ -21,7 +21,7 @@ class Organizations::BaseController < ApplicationController
end

def team_not_found_condition
@team.team_users.where(user_id: current_user.id).blank? && !@organization.is_owner?(current_user.id)
!current_user&.admin? && @team.team_users.where(user_id: current_user.id).blank? && !@organization.is_owner?(current_user.id)
end

def user_mark
@@ -31,4 +31,4 @@ class Organizations::BaseController < ApplicationController
def project_mark
params[:repo_name] || params[:id]
end
end
end

Loading…
Cancel
Save