diff options
| author | Alban Peignier | 2018-02-22 15:39:04 +0100 |
|---|---|---|
| committer | Alban Peignier | 2018-02-22 15:39:11 +0100 |
| commit | 435b6682d70e637e7911f19e94977d1146a63b1b (patch) | |
| tree | 766dc5c1291647e09dfd5eb12dea568e3bed6e75 | |
| parent | 451443c3aa0eebaa411d005e20253e98daeb391d (diff) | |
| download | chouette-core-435b6682d70e637e7911f19e94977d1146a63b1b.tar.bz2 | |
Return false in has_feature? when no organisation is defined. Refs #6007
| -rw-r--r-- | app/controllers/concerns/feature_checker.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/concerns/feature_checker.rb b/app/controllers/concerns/feature_checker.rb index 9ca5ed0a7..5e102ef1b 100644 --- a/app/controllers/concerns/feature_checker.rb +++ b/app/controllers/concerns/feature_checker.rb @@ -27,6 +27,8 @@ module FeatureChecker protected def has_feature?(*features) + return false unless current_organisation + features.all? do |feature| current_organisation.has_feature? feature end |
