Browse Source

FIX 去掉超级管理员不能访问别人私有项目的权限控制

tags/v1.0.0
Jasder 6 years ago
parent
commit
e707eb5e2b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/controllers/repositories_controller.rb

+ 2
- 1
app/controllers/repositories_controller.rb View File

@@ -123,6 +123,7 @@ class RepositoriesController < ApplicationController
end
def authorizate!
return if current_user && current_user.admin?
if @project.repository.hidden? && !@project.member?(current_user)
render_forbidden
end
@@ -143,7 +144,7 @@ class RepositoriesController < ApplicationController
@ref = params[:ref] || "master"
end
def get_latest_commit
def get_latest_commit
latest_commit = project_commits
@latest_commit = latest_commit[:body][0] if latest_commit.present?
@commits_count = latest_commit[:total_count] if latest_commit.present?


Loading…
Cancel
Save