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.
@@ -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"
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Core
3
- VERSION = "0.9.6"
3
+ VERSION = "0.9.7"
4
4
  end
5
5
  end