app/models/refinery/authentication/devise/user.rb in refinerycms-authentication-devise-1.0.3 vs app/models/refinery/authentication/devise/user.rb in refinerycms-authentication-devise-1.0.4
- old
+ new
@@ -68,9 +68,13 @@
has_role?(:superuser) || authorised_plugins.include?(plugin.name)
end
)
end
+ def has_plugin?(name)
+ active_plugins.names.include?(name)
+ end
+
def authorised_plugins
plugins.collect(&:name) | ::Refinery::Plugins.always_allowed.names
end
alias_method :authorized_plugins, :authorised_plugins