summaryrefslogtreecommitdiff
path: root/lib/declarative_policy/rule.rb
diff options
context:
space:
mode:
authorMike Lewis <mlewis@gitlab.com>2019-03-07 15:59:00 +0000
committerMike Lewis <mlewis@gitlab.com>2019-03-07 15:59:00 +0000
commitdbd7309a16bd3abc6c586b6c2df2beb317cfef95 (patch)
tree3fdd719c926ac80285f0dc93ef975625657d0fbb /lib/declarative_policy/rule.rb
parent7be248334b350091e83d0335bf0c263071c6a67f (diff)
parentb63efb09a5c864047924cd2d84527b47dd563d5f (diff)
downloadgitlab-ce-reply-to-comment-documentation.tar.gz
Merge branch 'master' into 'reply-to-comment-documentation'reply-to-comment-documentation
# Conflicts: # doc/user/discussions/index.md
Diffstat (limited to 'lib/declarative_policy/rule.rb')
-rw-r--r--lib/declarative_policy/rule.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/declarative_policy/rule.rb b/lib/declarative_policy/rule.rb
index f38f4f0a50f..964d35cde9e 100644
--- a/lib/declarative_policy/rule.rb
+++ b/lib/declarative_policy/rule.rb
@@ -84,7 +84,7 @@ module DeclarativePolicy
# returns nil unless it's already cached
def cached_pass?(context)
condition = context.condition(@name)
- return nil unless condition.cached?
+ return unless condition.cached?
condition.pass?
end
@@ -124,7 +124,7 @@ module DeclarativePolicy
def cached_pass?(context)
condition = delegated_context(context).condition(@name)
- return nil unless condition.cached?
+ return unless condition.cached?
condition.pass?
rescue MissingDelegate
@@ -161,7 +161,7 @@ module DeclarativePolicy
def cached_pass?(context)
runner = context.runner(@ability)
- return nil unless runner.cached?
+ return unless runner.cached?
runner.pass?
end