Module: Lockdown::RspecHelper

Defined in:
lib/lockdown/rspec_helper.rb

Instance Method Summary collapse

Instance Method Details

#login_adminObject



3
4
5
# File 'lib/lockdown/rspec_helper.rb', line 3

def 
  (:admin)
end

#login_standardObject



29
30
31
# File 'lib/lockdown/rspec_helper.rb', line 29

def 
  
end

#login_with_groups(*user_group_symbols) ⇒ Object Also known as: login_with_group



7
8
9
10
11
12
13
14
# File 'lib/lockdown/rspec_helper.rb', line 7

def (*user_group_symbols)
  access_rights = Lockdown::System.standard_authorized_user_rights
  user_group_symbols.each do |ugs|
    access_rights << Lockdown::System.access_rights_for_user_group(ugs)
  end
  
  controller.session[:access_rights] = access_rights.flatten
end

#login_with_permissions(*permissions_symbols) ⇒ Object Also known as: login_with_permission



18
19
20
21
22
23
24
25
# File 'lib/lockdown/rspec_helper.rb', line 18

def (*permissions_symbols)
  access_rights = Lockdown::System.standard_authorized_user_rights
  permissions_symbols.each do |ps|
    access_rights << Lockdown::System.access_rights_for_permission(ps)
  end
  
  controller.session[:access_rights] = access_rights.flatten.uniq
end

#public_userObject



33
34
35
# File 'lib/lockdown/rspec_helper.rb', line 33

def public_user
  setup_public_user
end