trusty-cms 2.0.24 → 2.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/login_system.rb CHANGED
@@ -120,7 +120,7 @@ module LoginSystem
120
120
  case
121
121
  when allowed_roles = permissions[:when]
122
122
  allowed_roles = [allowed_roles].flatten
123
- allowed_roles.any? { |role| user.has_role?(role) }
123
+ user.present? ? allowed_roles.any? { |role| user.has_role?(role) } : false
124
124
  when condition_method = permissions[:if]
125
125
  instance.send(condition_method)
126
126
  else
data/lib/trusty_cms.rb CHANGED
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = "2.0.24"
5
+ VERSION = "2.0.25"
6
6
  end
7
7
  end