Commit 9a24ccdea1dd4dc82ac7f24c1fa1706a20949898
1 parent
9dfbcc6e
Exists in
master
and in
4 other branches
Fixed mistype in permissions, Fixed migration
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
app/views/help/permissions.html.haml
db/migrate/20120216085842_move_to_roles_permissions.rb
... | ... | @@ -5,8 +5,12 @@ class MoveToRolesPermissions < ActiveRecord::Migration |
5 | 5 | repo_rw = 2 |
6 | 6 | project_rwa = 3 |
7 | 7 | |
8 | + | |
9 | + # Build masters and reset repo_access | |
10 | + UsersProject.update_all({:project_access => UsersProject::MASTER, :repo_access => 99 }, ["project_access = ?", project_rwa]) | |
11 | + | |
12 | + # Build other roles based on repo access | |
8 | 13 | UsersProject.update_all ["project_access = ?", UsersProject::DEVELOPER], ["repo_access = ?", repo_rw] |
9 | - UsersProject.update_all ["project_access = ?", UsersProject::MASTER], ["project_access = ?", project_rwa] | |
10 | 14 | UsersProject.update_all ["project_access = ?", UsersProject::REPORTER], ["repo_access = ?", repo_r] |
11 | 15 | UsersProject.update_all ["project_access = ?", UsersProject::GUEST], ["repo_access = ?", repo_n] |
12 | 16 | ... | ... |