diff options
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/ci/build.rb | 6 | ||||
| -rw-r--r-- | app/models/notification_recipient.rb | 12 | ||||
| -rw-r--r-- | app/models/project.rb | 2 | 
3 files changed, 10 insertions, 10 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 3e3ef674dff..1c8d9ca4aa5 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -479,7 +479,7 @@ module Ci      def user_variables        Gitlab::Ci::Variables::Collection.new.tap do |variables| -        return variables if user.blank? +        break variables if user.blank?          variables.append(key: 'GITLAB_USER_ID', value: user.id.to_s)          variables.append(key: 'GITLAB_USER_EMAIL', value: user.email) @@ -594,7 +594,7 @@ module Ci      def persisted_variables        Gitlab::Ci::Variables::Collection.new.tap do |variables| -        return variables unless persisted? +        break variables unless persisted?          variables            .append(key: 'CI_JOB_ID', value: id.to_s) @@ -643,7 +643,7 @@ module Ci      def persisted_environment_variables        Gitlab::Ci::Variables::Collection.new.tap do |variables| -        return variables unless persisted? && persisted_environment.present? +        break variables unless persisted? && persisted_environment.present?          variables.concat(persisted_environment.predefined_variables) diff --git a/app/models/notification_recipient.rb b/app/models/notification_recipient.rb index b3ffad00a07..2c3580bbdc6 100644 --- a/app/models/notification_recipient.rb +++ b/app/models/notification_recipient.rb @@ -83,14 +83,14 @@ class NotificationRecipient    def has_access?      DeclarativePolicy.subject_scope do -      return false unless user.can?(:receive_notifications) -      return true if @skip_read_ability +      break false unless user.can?(:receive_notifications) +      break true if @skip_read_ability -      return false if @target && !user.can?(:read_cross_project) -      return false if @project && !user.can?(:read_project, @project) +      break false if @target && !user.can?(:read_cross_project) +      break false if @project && !user.can?(:read_project, @project) -      return true unless read_ability -      return true unless DeclarativePolicy.has_policy?(@target) +      break true unless read_ability +      break true unless DeclarativePolicy.has_policy?(@target)        user.can?(read_ability, @target)      end diff --git a/app/models/project.rb b/app/models/project.rb index ffd78d3ab70..38139a9b137 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1637,7 +1637,7 @@ class Project < ActiveRecord::Base    def container_registry_variables      Gitlab::Ci::Variables::Collection.new.tap do |variables| -      return variables unless Gitlab.config.registry.enabled +      break variables unless Gitlab.config.registry.enabled        variables.append(key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port)  | 
