Merge branch 'dev_trustie' into dev_devops
This commit is contained in:
commit
a10a3768c9
|
@ -121,6 +121,7 @@ class RepositoriesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def authorizate!
|
def authorizate!
|
||||||
|
return if current_user && current_user.admin?
|
||||||
if @project.repository.hidden? && !@project.member?(current_user)
|
if @project.repository.hidden? && !@project.member?(current_user)
|
||||||
render_forbidden
|
render_forbidden
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
class ResetProjectIssuesCounte < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
projects = Project.select(:id, :issues_count).all
|
||||||
|
projects.each do |p|
|
||||||
|
puts p.id
|
||||||
|
Project.reset_counters( p.id, :issues_count, touch: false )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue