diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/concerns/feature_checker.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/concerns/feature_checker.rb b/app/controllers/concerns/feature_checker.rb index c23e672cf..9ca5ed0a7 100644 --- a/app/controllers/concerns/feature_checker.rb +++ b/app/controllers/concerns/feature_checker.rb @@ -33,8 +33,9 @@ module FeatureChecker end def check_feature!(*features) - authorized = has_feature? *features - raise NotAuthorizedError, "Feature not autorized" unless authorized + unless has_feature?(*features) + raise NotAuthorizedError, "Feature not autorized" + end end class NotAuthorizedError < StandardError; end |
