Commit d32e5f61 authored by Robert Speicher's avatar Robert Speicher

Remove EE-specific uses of `User#is_admin?`

parent ea64e309
......@@ -24,6 +24,6 @@ class Projects::ServiceDeskController < Projects::ApplicationController
end
def authorize_admin_instance!
return render_404 unless current_user.is_admin?
return render_404 unless current_user.admin?
end
end
......@@ -15,7 +15,7 @@ module LicenseHelper
# in_html is set to false from an initializer, which shouldn't try to render
# HTML links.
#
def license_message(signed_in: signed_in?, is_admin: (current_user && current_user.is_admin?), in_html: true)
def license_message(signed_in: signed_in?, is_admin: (current_user && current_user.admin?), in_html: true)
@license_message =
if License.current
yes_license_message(signed_in, is_admin)
......
......@@ -45,7 +45,7 @@ module EE
end
def check_access(user)
return true if user.is_admin?
return true if user.admin?
return user.id == self.user_id if self.user.present?
return group.users.exists?(user.id) if self.group.present?
......
......@@ -135,7 +135,7 @@
.js-service-desk-setting-root{ data: { endpoint: namespace_project_service_desk_path(@project.namespace, @project),
enabled: @project.service_desk_enabled,
incoming_email: (@project.service_desk_address if @project.service_desk_enabled),
is_instance_admin: current_user.is_admin? } }
is_instance_admin: current_user.admin? } }
%hr
%fieldset.features.append-bottom-default
......
......@@ -143,7 +143,7 @@ module Gitlab
end
if ::License.block_changes?
message = ::LicenseHelper.license_message(signed_in: true, is_admin: (user && user.is_admin?))
message = ::LicenseHelper.license_message(signed_in: true, is_admin: (user && user.admin?))
raise UnauthorizedError, strip_tags(message)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment