lockdown 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.3.13 2008-05-02
2
+ * Fixed: The users and user_groups controller templates needed user_groups_for_users and all_permissions (respectively) instance variables set if validation failed on update.
3
+
1
4
  == 0.3.12 2008-05-02
2
5
  * Fixed: The timestamps were being set on created_by and updated_by.
3
6
  * Changed: The init.rb and lockdown_all interaction to better define where configurations should be placed.
@@ -2,7 +2,7 @@ module Lockdown #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- TINY = 12
5
+ TINY = 13
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -66,6 +66,7 @@ class UserGroupsController < ApplicationController
66
66
  format.html { redirect_to(@user_group) }
67
67
  format.xml { head :ok }
68
68
  else
69
+ @all_permissions = Lockdown::System.permissions_assignable_for_user(current_user)
69
70
  format.html { render :action => "edit" }
70
71
  format.xml { render :xml => @user_group.errors, :status => :unprocessable_entity }
71
72
  end
@@ -66,6 +66,7 @@ class UsersController < ApplicationController
66
66
  format.html { redirect_to(@user) }
67
67
  format.xml { head :ok }
68
68
  else
69
+ @user_groups_for_user = Lockdown::System.user_groups_assignable_for_user(current_user)
69
70
  format.html { render :action => "edit" }
70
71
  format.xml { render :xml => @user.errors, :status => :unprocessable_entity }
71
72
  end
data/website/index.txt CHANGED
@@ -59,7 +59,7 @@ To define access rights you need to modify lib/lockdown/init.rb. This is the de
59
59
  require "lockdown"
60
60
  require File.join(File.dirname(__FILE__), "session")
61
61
 
62
- Lockdown::System.configure do
62
+ Lockdown::System.configure do
63
63
 
64
64
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
65
  # Configuration Options
@@ -113,6 +113,8 @@ Lockdown::System.configure do
113
113
  # set_permission(:sessions, all_methods(:sessions))
114
114
  # set_permission(:my_account, only_methods(:users, :edit, :update, :show))
115
115
  #
116
+ # Define your permissions here:
117
+
116
118
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117
119
  # Built-in user groups
118
120
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -125,6 +127,8 @@ Lockdown::System.configure do
125
127
  # Restrict :my_account access to only authenticated users:
126
128
  # set_protected_access :my_account
127
129
  #
130
+ # Define the built-in user groups here:
131
+
128
132
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129
133
  # Define user groups
130
134
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -135,9 +139,11 @@ Lockdown::System.configure do
135
139
  # :catalog_management is the name of the user group
136
140
  # :category_management and :product_management refer to permission names
137
141
  #
142
+ #
143
+ # Define your user groups here:
138
144
 
139
- # Add your configuration below:
140
145
  end
146
+
141
147
  </pre>
142
148
 
143
149
  h2. The internals
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone