summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2019-04-05 13:02:56 +0000
committerAndreas Brandl <abrandl@gitlab.com>2019-04-05 13:02:56 +0000
commit46b1b9c1d61c269588bd3cd4203420608ddd7f0b (patch)
treea877f5366d3367e1264e96f3f5e8a4b23bdbd62a /app/models
parent7a48a06cf3b454021aa466464686fee8c82d6862 (diff)
downloadgitlab-ce-46b1b9c1d61c269588bd3cd4203420608ddd7f0b.tar.gz
Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_setting.rb34
-rw-r--r--app/models/issue.rb10
-rw-r--r--app/models/project.rb5
3 files changed, 2 insertions, 47 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index d28a12413bf..7ec8505b33a 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -213,40 +213,6 @@ class ApplicationSetting < ApplicationRecord
validate :terms_exist, if: :enforce_terms?
- validates :external_authorization_service_default_label,
- presence: true,
- if: :external_authorization_service_enabled
-
- validates :external_authorization_service_url,
- url: true, allow_blank: true,
- if: :external_authorization_service_enabled
-
- validates :external_authorization_service_timeout,
- numericality: { greater_than: 0, less_than_or_equal_to: 10 },
- if: :external_authorization_service_enabled
-
- validates :external_auth_client_key,
- presence: true,
- if: -> (setting) { setting.external_auth_client_cert.present? }
-
- validates_with X509CertificateCredentialsValidator,
- certificate: :external_auth_client_cert,
- pkey: :external_auth_client_key,
- pass: :external_auth_client_key_pass,
- if: -> (setting) { setting.external_auth_client_cert.present? }
-
- attr_encrypted :external_auth_client_key,
- mode: :per_attribute_iv,
- key: Settings.attr_encrypted_db_key_base_truncated,
- algorithm: 'aes-256-gcm',
- encode: true
-
- attr_encrypted :external_auth_client_key_pass,
- mode: :per_attribute_iv,
- key: Settings.attr_encrypted_db_key_base_truncated,
- algorithm: 'aes-256-gcm',
- encode: true
-
before_validation :ensure_uuid!
before_validation :strip_sentry_values
diff --git a/app/models/issue.rb b/app/models/issue.rb
index eb4c87e05d5..97c6dcc4745 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -230,13 +230,7 @@ class Issue < ApplicationRecord
def visible_to_user?(user = nil)
return false unless project && project.feature_available?(:issues, user)
- return publicly_visible? unless user
-
- return false unless readable_by?(user)
-
- user.full_private_access? ||
- ::Gitlab::ExternalAuthorization.access_allowed?(
- user, project.external_authorization_classification_label)
+ user ? readable_by?(user) : publicly_visible?
end
def check_for_spam?
@@ -304,7 +298,7 @@ class Issue < ApplicationRecord
# Returns `true` if this Issue is visible to everybody.
def publicly_visible?
- project.public? && !confidential? && !::Gitlab::ExternalAuthorization.enabled?
+ project.public? && !confidential?
end
def expire_etag_cache
diff --git a/app/models/project.rb b/app/models/project.rb
index 97e287d3fa2..e2869fc2ad5 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -2062,11 +2062,6 @@ class Project < ApplicationRecord
fetch_branch_allows_collaboration(user, branch_name)
end
- def external_authorization_classification_label
- super || ::Gitlab::CurrentSettings.current_application_settings
- .external_authorization_service_default_label
- end
-
def licensed_features
[]
end