Adds the logout link to the navigator.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/helper.rb, line 17
17: def logout_link(navigator)
18: navigator.add_link(:method => :delete) do |link|
19: link.text = I18n.t("ubiquo.auth.logout")
20: link.url = ubiquo_logout_path
21: end
22: end
Adds a superadmin home tab to the tabnav. It doesn’t validates that the user is a superadmin, it’s supposed.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/helper.rb, line 37
37: def superadmin_home_tab(tabnav)
38: tabnav.add_tab do |tab|
39: tab.text = I18n.t("ubiquo.auth.superadmin_home")
40: tab.title = I18n.t("ubiquo.auth.superadmin_home_title")
41: tab.highlights_on({:controller => "ubiquo/superadmin_homes"})
42: tab.link = ubiquo_superadmin_home_path
43: end
44: end
returns if the superadmin mode is actived or not.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/helper.rb, line 64
64: def superadmin_mode?
65: session[:superadmin_mode]==true
66: end
Adds a superadmin mode toggle link to the navigator. It’s show the link only if the user is superadmin.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/helper.rb, line 48
48: def toggle_superadmin_mode_link(navigator)
49: return unless current_ubiquo_user.is_superadmin?
50: if superadmin_mode?
51: navigator.add_link(:method => :delete) do |link|
52: link.text = t("ubiquo.auth.back_from_superadmin_mode")
53: link.url = ubiquo_superadmin_mode_path
54: end
55: else
56: navigator.add_link(:method => :post) do |link|
57: link.text = t("ubiquo.auth.go_to_superadmin_mode")
58: link.url = ubiquo_superadmin_mode_path
59: end
60: end
61: end
Adds user_name link that points to the profile page to the navigator.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/helper.rb, line 26
26: def ubiquo_user_name_link(navigator)
27: navigator.add_link do |link|
28: link.text = current_ubiquo_user.full_name
29: link.class = "ubiquo_user"
30: link.url = edit_ubiquo_ubiquo_user_profile_path
31: link.highlights << {:controller => "ubiquo/ubiquo_user_profiles"}
32: end
33: end
Adds the ubiquo_users management link to the navigator.This runs the ubiquo_authentication.user_navigation_permission for checking if the user can access to that page.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/helper.rb, line 8
8: def ubiquo_users_link(navigator)
9: navigator.add_link do |link|
10: link.text = I18n.t("ubiquo.auth.users")
11: link.highlights << {:controller => "ubiquo/ubiquo_users"}
12: link.url = ubiquo_ubiquo_users_path
13: end if ubiquo_config_call(:user_navigator_permission, {:context => :ubiquo_authentication})
14: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.