class Refinery::Core::NilUser

Public Instance Methods

active_plugins() click to toggle source

Returns all plugins that the user has access to, that are currently loaded in the system. For NilUser, this returns all registered plugins. Should be overridden in authentication solutions

# File lib/refinery/core/nil_user.rb, line 17
def active_plugins
  Refinery::Plugins.registered
end
has_plugin?(name) click to toggle source

Returns true. Should be overridden in authentication solutions. A real solution might be: `Refinery::Plugins.active.names.include?(name)`

# File lib/refinery/core/nil_user.rb, line 30
def has_plugin?(name)
  true
end
has_role?(role) click to toggle source

The default NilUser has all roles and can access all plugins. Should be overridden in authentication solutions.

# File lib/refinery/core/nil_user.rb, line 9
def has_role?(role)
  true
end
landing_url() click to toggle source

Returns a URL to the first plugin with a URL in the menu. Used for admin users' root admin url. Should be overridden in authentication solutions.

# File lib/refinery/core/nil_user.rb, line 37
def landing_url
  active_plugins.first_url_in_menu
end
plugins() click to toggle source

Returns all registered plugins. Should be overridden in authentication solutions.

# File lib/refinery/core/nil_user.rb, line 23
def plugins
  Refinery::Plugins.registered
end