Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-03 15:08:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-03 15:08:53 +0300
commitb922b2f47a06597d5cbd77bf9b7f4c5fb3dbd8ed (patch)
tree5f86b7f535d3a6881d1d653238d623defa70e26e /lib/gitlab
parent1c75400c24137f603678d0ee3d497b0c9280e7f7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/usage_data.rb3
-rw-r--r--lib/gitlab/user_access.rb6
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index b1953aab4fd..073592797f0 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -170,6 +170,9 @@ module Gitlab
def system_usage_data_monthly
{
counts_monthly: {
+ deployments: count(Deployment.where(last_28_days_time_period)),
+ successful_deployments: count(Deployment.success.where(last_28_days_time_period)),
+ failed_deployments: count(Deployment.failed.where(last_28_days_time_period)),
personal_snippets: count(PersonalSnippet.where(last_28_days_time_period)),
project_snippets: count(ProjectSnippet.where(last_28_days_time_period))
}.tap do |data|
diff --git a/lib/gitlab/user_access.rb b/lib/gitlab/user_access.rb
index 5e0a4faeba8..1551548d9b4 100644
--- a/lib/gitlab/user_access.rb
+++ b/lib/gitlab/user_access.rb
@@ -92,12 +92,6 @@ module Gitlab
end
end
- def can_read_project?
- return false unless can_access_git?
-
- user.can?(:read_project, project)
- end
-
private
def permission_cache