Skip to content
Snippets Groups Projects
Commit 9a24ccde authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fixed mistype in permissions, Fixed migration

parent 9dfbcc6e
No related branches found
No related tags found
No related merge requests found
%h3 Permissions
%hr
 
%h4 Reporter
%h4 Guest
%ul
%li Create new issue
%li Create new merge request
Loading
Loading
Loading
Loading
@@ -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]
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment