summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-09-07 14:58:01 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-09-07 14:58:01 +0530
commitf5b9837c19f48255237eca1e618fc632a45b58b5 (patch)
tree2653e9aa1e3bf0a1db6630bb52863c30e6313d87 /app/models/user.rb
parent72b9b87ca93615640dcc022f324b2af16ceaa4eb (diff)
parent1d5488699678d22644d24add4b89cede0419ad25 (diff)
downloadgitlab-ce-f5b9837c19f48255237eca1e618fc632a45b58b5.tar.gz
Merge remote-tracking branch 'origin/master' into 21170-cycle-analytics
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index ad3cfbc03e4..6996740eebd 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -433,7 +433,7 @@ class User < ActiveRecord::Base
#
# This logic is duplicated from `Ability#project_abilities` into a SQL form.
def projects_where_can_admin_issues
- authorized_projects(Gitlab::Access::REPORTER).non_archived.where.not(issues_enabled: false)
+ authorized_projects(Gitlab::Access::REPORTER).non_archived.with_issues_enabled
end
def is_admin?
@@ -460,16 +460,12 @@ class User < ActiveRecord::Base
can?(:create_group, nil)
end
- def abilities
- Ability.abilities
- end
-
def can_select_namespace?
several_namespaces? || admin
end
def can?(action, subject)
- abilities.allowed?(self, action, subject)
+ Ability.allowed?(self, action, subject)
end
def first_name