Commit 9a24ccde authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fixed mistype in permissions, Fixed migration

parent 9dfbcc6e
%h3 Permissions
%hr
%h4 Reporter
%h4 Guest
%ul
%li Create new issue
%li Create new merge request
......
......@@ -5,8 +5,12 @@ class MoveToRolesPermissions < ActiveRecord::Migration
repo_rw = 2
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::MASTER], ["project_access = ?", project_rwa]
UsersProject.update_all ["project_access = ?", UsersProject::REPORTER], ["repo_access = ?", repo_r]
UsersProject.update_all ["project_access = ?", UsersProject::GUEST], ["repo_access = ?", repo_n]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment