Fixed mistype in permissions, Fixed migration
This commit is contained in:
parent
9dfbcc6ef3
commit
9a24ccdea1
2 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
%h3 Permissions
|
%h3 Permissions
|
||||||
%hr
|
%hr
|
||||||
|
|
||||||
%h4 Reporter
|
%h4 Guest
|
||||||
%ul
|
%ul
|
||||||
%li Create new issue
|
%li Create new issue
|
||||||
%li Create new merge request
|
%li Create new merge request
|
||||||
|
|
|
@ -5,8 +5,12 @@ class MoveToRolesPermissions < ActiveRecord::Migration
|
||||||
repo_rw = 2
|
repo_rw = 2
|
||||||
project_rwa = 3
|
project_rwa = 3
|
||||||
|
|
||||||
|
|
||||||
|
# Build masters and reset repo_access
|
||||||
|
UsersProject.update_all({:project_access => UsersProject::MASTER, :repo_access => 99 }, ["project_access = ?", project_rwa])
|
||||||
|
|
||||||
|
# Build other roles based on repo access
|
||||||
UsersProject.update_all ["project_access = ?", UsersProject::DEVELOPER], ["repo_access = ?", repo_rw]
|
UsersProject.update_all ["project_access = ?", UsersProject::DEVELOPER], ["repo_access = ?", repo_rw]
|
||||||
UsersProject.update_all ["project_access = ?", UsersProject::MASTER], ["project_access = ?", project_rwa]
|
|
||||||
UsersProject.update_all ["project_access = ?", UsersProject::REPORTER], ["repo_access = ?", repo_r]
|
UsersProject.update_all ["project_access = ?", UsersProject::REPORTER], ["repo_access = ?", repo_r]
|
||||||
UsersProject.update_all ["project_access = ?", UsersProject::GUEST], ["repo_access = ?", repo_n]
|
UsersProject.update_all ["project_access = ?", UsersProject::GUEST], ["repo_access = ?", repo_n]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue