lockdown 0.5.9 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/History.txt +8 -0
  2. data/Manifest.txt +1 -2
  3. data/bin/lockdown +3 -1
  4. data/config/hoe.rb +1 -1
  5. data/lib/lockdown/classy-inheritance.rb +153 -0
  6. data/lib/lockdown/version.rb +1 -1
  7. data/rails_generators/lockdown/lockdown_generator.rb +12 -12
  8. data/rails_generators/lockdown/templates/app/controllers/user_groups_controller.rb +1 -1
  9. data/rails_generators/lockdown/templates/app/controllers/users_controller.rb +0 -5
  10. data/rails_generators/lockdown/templates/app/helpers/user_groups_helper.rb +3 -3
  11. data/rails_generators/lockdown/templates/app/helpers/users_helper.rb +12 -12
  12. data/rails_generators/lockdown/templates/app/models/user.rb +8 -11
  13. data/rails_generators/lockdown/templates/app/views/permissions/_data.html.erb +3 -3
  14. data/rails_generators/lockdown/templates/app/views/permissions/index.html.erb +4 -4
  15. data/rails_generators/lockdown/templates/app/views/permissions/show.html.erb +2 -2
  16. data/rails_generators/lockdown/templates/app/views/user_groups/_data.html.erb +29 -5
  17. data/rails_generators/lockdown/templates/app/views/user_groups/_form.html.erb +6 -6
  18. data/rails_generators/lockdown/templates/app/views/user_groups/edit.html.erb +3 -3
  19. data/rails_generators/lockdown/templates/app/views/user_groups/index.html.erb +7 -7
  20. data/rails_generators/lockdown/templates/app/views/user_groups/new.html.erb +2 -2
  21. data/rails_generators/lockdown/templates/app/views/user_groups/show.html.erb +5 -5
  22. data/rails_generators/lockdown/templates/app/views/users/_data.html.erb +34 -10
  23. data/rails_generators/lockdown/templates/app/views/users/_form.html.erb +7 -7
  24. data/rails_generators/lockdown/templates/app/views/users/edit.html.erb +3 -3
  25. data/rails_generators/lockdown/templates/app/views/users/index.html.erb +8 -8
  26. data/rails_generators/lockdown/templates/app/views/users/new.html.erb +2 -2
  27. data/rails_generators/lockdown/templates/app/views/users/show.html.erb +3 -3
  28. data/rails_generators/lockdown/templates/db/migrate/create_admin_user.rb +6 -8
  29. data/website/index.html +8 -264
  30. data/website/index.txt +6 -244
  31. metadata +5 -7
  32. data/website/generator.html +0 -264
  33. data/website/generator.txt +0 -188
@@ -1,188 +0,0 @@
1
- h1. <a href="http://lockdown.rubyforge.org">Lockdown</a>
2
-
3
- h2. What
4
-
5
- This page will describe how to get started with a new application.
6
-
7
- There are now generator options to give you more control over which templates you want to mix-in to your application:
8
-
9
- <ul>
10
- <li> --all
11
- <p> Install all Lockdown templates </p>
12
- </li>
13
- <li> --models
14
- <p> Install only models and migrations (skip migrations by --no_migrations) </p>
15
- </li>
16
- <li> --management
17
- <p> Install management functionality. Which is --all minus --login. All models (migrations) included.</p>
18
- </li>
19
- <li> --login
20
- <p>Install login functionality. Which is --all minus --management. All models (migrations) included.</p>
21
- </li>
22
- <li> --no_migrations
23
- <p>Skip migrations installation</p>
24
- </li>
25
- </ul>
26
-
27
- h2. Creating a new application
28
-
29
-
30
- <pre>
31
- $ rails demo_app
32
- <snip output>
33
- $ cd demo_app
34
- $ lockdown .
35
- ------------------------------------------------------------
36
- Installing Lockdown
37
- create lib/lockdown
38
- create lib/lockdown/session.rb
39
- create lib/lockdown/init.rb
40
- ------------------------------------------------------------
41
-
42
-
43
- ------------------------------------------------------------
44
- Modified config/environment.rb by adding:
45
- require "lockdown/init"
46
- ------------------------------------------------------------
47
-
48
-
49
- ------------------------------------------------------------
50
- You are now locked down. To open up access to your application
51
- please modify lib/lockdown/init.rb. This is where you'll
52
- add permissions and create user groups.
53
-
54
- To modify the contents of your session and to add access
55
- methods, modify lib/lockdown/session.rb.
56
-
57
- If you want to know more, please visit:
58
-
59
- http://lockdown.rubyforge.org
60
-
61
- If you have any suggestions, comments or issues
62
- please visit the Lockdown Google group:
63
-
64
- http://groups.google.com/group/stonean_lockdown?hl=en
65
- ------------------------------------------------------------
66
- </pre>
67
-
68
- Now it's time to get the template...
69
-
70
- <pre>
71
- $ ./script/generate lockdown --all
72
- exists app/helpers
73
- exists app/models
74
- exists app/views
75
- create app/views/users
76
- create app/views/user_groups
77
- create app/views/permissions
78
- create app/views/sessions
79
- exists app/controllers
80
- create app/controllers/permissions_controller.rb
81
- create app/controllers/users_controller.rb
82
- create app/controllers/user_groups_controller.rb
83
- create app/controllers/sessions_controller.rb
84
- create app/models/permission.rb
85
- create app/models/user.rb
86
- create app/models/user_group.rb
87
- create app/models/profile.rb
88
- route map.resources :permissions
89
- route map.resources :user_groups
90
- route map.resources :users
91
- route map.resources :sessions
92
- create app/helpers/permissions_helper.rb
93
- create app/helpers/users_helper.rb
94
- create app/helpers/user_groups_helper.rb
95
- create app/views/users/_data.html.erb
96
- create app/views/users/_form.html.erb
97
- create app/views/users/index.html.erb
98
- create app/views/users/show.html.erb
99
- create app/views/users/edit.html.erb
100
- create app/views/users/new.html.erb
101
- create app/views/users/_password.html.erb
102
- create app/views/user_groups/_data.html.erb
103
- create app/views/user_groups/_form.html.erb
104
- create app/views/user_groups/index.html.erb
105
- create app/views/user_groups/show.html.erb
106
- create app/views/user_groups/edit.html.erb
107
- create app/views/user_groups/new.html.erb
108
- create app/views/permissions/_data.html.erb
109
- create app/views/permissions/index.html.erb
110
- create app/views/permissions/show.html.erb
111
- create app/views/sessions/new.html.erb
112
- create db/migrate
113
- create db/migrate/001_create_profiles.rb
114
- exists db/migrate
115
- create db/migrate/002_create_users.rb
116
- exists db/migrate
117
- create db/migrate/003_create_user_groups.rb
118
- exists db/migrate
119
- create db/migrate/004_create_permissions.rb
120
- exists db/migrate
121
- create db/migrate/005_create_admin_user_and_user_group.rb
122
- </pre>
123
-
124
- Run your migrations:
125
-
126
- <pre>
127
- $ rake db:migrate --trace
128
- </pre>
129
-
130
- Remove index.html
131
-
132
- <pre>
133
- $ rm public/index.html
134
- </pre>
135
-
136
- Start the app and then open up your browser to http://localhost:3000
137
-
138
- <pre>
139
- $ ./script/server
140
- </pre>
141
-
142
- You'll see that the "lockdown --all" generator has added a default route to the login page.
143
-
144
- Login using the basic admin account with credentials: admin/password
145
-
146
- After you login (you'll still be on the login page), go one of the following pages:
147
-
148
- http://localhost:3000/users
149
-
150
- http://localhost:3000/user_groups
151
-
152
- There is a permissiosn page also available, but you don't have any with the basic install. And since permissions cannot be created via the admin screens, this doesn't have much value for you now.
153
-
154
- http://localhost:3000/permissions
155
-
156
-
157
- h2. Permissions
158
-
159
- Alright, so there's not a lot to see on these basic screens but that's only because there's isn't a lot to the system at the moment.
160
-
161
- Now it's time to look at lib/lockdown/init.rb. Open it in your favorite editor.
162
-
163
- There's some documentation with examples that will hopefully server for more than a reminder. Please read that documentation before continuing here.
164
-
165
- ...
166
-
167
- I guess that wasn't sufficient? If you don't understand how to use init.rb, please post a question on the forum and I'll address the issue there and then update init.rb.
168
-
169
- For simplicity sake, I would like the documentation for init.rb contained within that file.
170
-
171
- h2. Github
172
-
173
- The Clone URL: git://github.com/stonean/lockdown.git
174
-
175
- Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/.
176
-
177
- I'm new to git and this whole opensource project admin gig, so please be patient with my stumbling around.
178
-
179
- h2. Contact
180
-
181
- Please use the "forum":http://stonean.com/projects/lockdown/boards to ask questions and the "issue tracker":http://stonean.com/projects/lockdown/issues to report problems or submit a pull request.
182
-
183
- h2. License
184
-
185
- This code is free to use under the terms of the MIT license.
186
-
187
- Copyright (c) 2008 Andrew Stone
188
-