spud_core 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/spud/users_controller.rb +3 -0
- data/app/models/spud_user.rb +4 -0
- data/lib/spud_core/version.rb +1 -1
- data/spec/dummy/log/test.log +3385 -0
- metadata +4 -4
@@ -3,6 +3,9 @@ class Spud::UsersController < Spud::ApplicationController
|
|
3
3
|
layout 'spud/admin/detail'
|
4
4
|
|
5
5
|
def settings
|
6
|
+
if current_user.has_admin_rights?
|
7
|
+
add_breadcrumb "Dashboard", :spud_admin_root_path
|
8
|
+
end
|
6
9
|
add_breadcrumb "Settings", :spud_settings_path
|
7
10
|
@page_thumbnail = "spud/admin/users_thumb.png"
|
8
11
|
@page_name = "Settings"
|
data/app/models/spud_user.rb
CHANGED
@@ -10,6 +10,10 @@ class SpudUser < ActiveRecord::Base
|
|
10
10
|
# c.my_config_option = my_value # for available options see documentation in: Authlogic::ActsAsAuthentic
|
11
11
|
end # block optional
|
12
12
|
|
13
|
+
def has_admin_rights?
|
14
|
+
return self.super_admin || self.spud_admin_permissions.count > 0
|
15
|
+
end
|
16
|
+
|
13
17
|
def full_name
|
14
18
|
if first_name.blank? && last_name.blank?
|
15
19
|
return self.login
|
data/lib/spud_core/version.rb
CHANGED