spud_core 0.7.2 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,19 @@
1
1
  class Spud::UsersController < Spud::ApplicationController
2
2
  before_filter :require_user
3
3
  layout 'spud/admin/detail'
4
- add_breadcrumb "Settings", :spud_settings_path
4
+
5
5
  def settings
6
+ add_breadcrumb "Settings", :spud_settings_path
6
7
  @page_thumbnail = "spud/admin/users_thumb.png"
7
8
  @page_name = "Settings"
8
9
  end
9
10
 
10
11
  def update
12
+
13
+ add_breadcrumb "Settings", :spud_settings_path
11
14
  @page_thumbnail = "spud/admin/users_thumb.png"
12
15
  @page_name = "Settings"
13
- if @current_user.update_attributes(params[:spud_user])
16
+ if @current_user.update_attributes(params[:spud_user].slice :login,:first_name,:last_name,:email,:password,:password_confirmation)
14
17
  flash[:notice] = "User settings saved successfully."
15
18
  redirect_to spud_admin_root_url()
16
19
  else
@@ -1,2 +1,5 @@
1
1
  class SpudAdminPermission < ActiveRecord::Base
2
+ belongs_to :spud_user,:foreign_key => :user_id
3
+ attr_accessible :name,:access
4
+
2
5
  end
@@ -1,8 +1,8 @@
1
1
  class SpudUser < ActiveRecord::Base
2
2
  has_many :spud_admin_permissions,:foreign_key => :user_id
3
3
  accepts_nested_attributes_for :spud_admin_permissions, :allow_destroy => true
4
- attr_protected :super_admin
5
-
4
+
5
+ attr_accessible :login,:email,:first_name,:last_name,:password,:password_confirmation,:password_salt,:last_login_at,:last_request_at,:last_login_ip,:failed_login_count,:current_login_at,:login_count,:persistence_token,:perishable_token,:single_access_token,:crypted_password, :current_login_ip, :created_at, :updated_at,:spud_admin_permissions_attributes
6
6
  acts_as_authentic do |c|
7
7
  # c.my_config_option = my_value # for available options see documentation in: Authlogic::ActsAsAuthentic
8
8
  end # block optional
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Core
3
- VERSION = "0.7.2"
3
+ VERSION = "0.7.4"
4
4
  end
5
5
  end