lockdown 0.3.12 → 0.3.13
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/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.
|
data/lib/lockdown/version.rb
CHANGED
@@ -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
|