Class: EacRailsBase0::AppBase::AbilityMapping

Inherits:
Object
  • Object
show all
Includes:
CanCanDry::AbilityMapping, CanCanDry::AbilityMappingSets::ActiveScaffold, CanCanDry::AbilityMappingSets::Devise, CanCanDry::AbilityMappingSets::DeviseInvitable
Defined in:
lib/eac_rails_base0/app_base/ability_mapping.rb

Direct Known Subclasses

AbilityMapping

Constant Summary collapse

MAP_METHODS =
%w[aranha devise devise_invitable eac_rails_base0
 eac_rails_delayed_job eac_rails_remotes eac_users_support tasks_schedulers]
.freeze

Instance Method Summary collapse

Constructor Details

#initializeAbilityMapping

Returns a new instance of AbilityMapping.



17
18
19
# File 'lib/eac_rails_base0/app_base/ability_mapping.rb', line 17

def initialize
  MAP_METHODS.each { |m| send("map_#{m}") }
end

Instance Method Details

#map_aranhaObject



37
38
39
40
41
# File 'lib/eac_rails_base0/app_base/ability_mapping.rb', line 37

def map_aranha
  map_controller 'Aranha::Addresses', :manage, ::Aranha::Address
  map_controller 'Aranha::ProcessorConfigurations', :manage, ::Aranha::ProcessorConfiguration
  map_controller 'Aranha::StartPoints', :manage, ::Aranha::StartPoint
end

#map_eac_rails_base0Object



29
30
31
# File 'lib/eac_rails_base0/app_base/ability_mapping.rb', line 29

def map_eac_rails_base0
  map_controller 'EacRailsBase0::Mailer', :manage, :eac_rails_base0_mailer
end

#map_eac_rails_delayed_jobObject



21
22
23
# File 'lib/eac_rails_base0/app_base/ability_mapping.rb', line 21

def map_eac_rails_delayed_job
  map_controller 'EacRailsDelayedJob::DelayedJobs', :manage, ::Delayed::Job
end

#map_eac_rails_remotesObject



25
26
27
# File 'lib/eac_rails_base0/app_base/ability_mapping.rb', line 25

def map_eac_rails_remotes
  map_controller 'EacRailsRemotes::Instances', :manage, ::EacRailsRemotes::Instance
end

#map_eac_users_supportObject



33
34
35
# File 'lib/eac_rails_base0/app_base/ability_mapping.rb', line 33

def map_eac_users_support
  map_controller 'EacUsersSupport::Admin::Users', :manage, ::EacUsersSupport::User
end

#map_tasks_schedulersObject



43
44
45
46
47
# File 'lib/eac_rails_base0/app_base/ability_mapping.rb', line 43

def map_tasks_schedulers
  map_controller 'ScheduledTasks', :manage, ::ScheduledTask
  map_controller 'ScheduledTaskStatuses', :manage, ::ScheduledTask
  map_controller 'TasksSchedulerDaemon', :manage, ::ScheduledTask
end