Questions: Fix permissions migration

main
Igor Scheller 4 years ago
parent b5c974b9e3
commit 48e1d9f5f8

@ -19,7 +19,7 @@ class CreateQuestionsPermissions extends Migration
]); ]);
$userGroup = -20; $userGroup = -20;
$shiftCoordinatorGroup = -60; $shiftCoordinatorGroup = -40;
$addId = $db->table('Privileges')->where('name', 'question.add')->first()->id; $addId = $db->table('Privileges')->where('name', 'question.add')->first()->id;
$editId = $db->table('Privileges')->where('name', 'question.edit')->first()->id; $editId = $db->table('Privileges')->where('name', 'question.edit')->first()->id;
$db->table('GroupPrivileges')->insert([ $db->table('GroupPrivileges')->insert([
@ -52,8 +52,8 @@ class CreateQuestionsPermissions extends Migration
['name' => 'admin_questions', 'desc' => 'Answer user\'s questions'], ['name' => 'admin_questions', 'desc' => 'Answer user\'s questions'],
]); ]);
$userGroup = -20; $userGroup = -20;
$shiftCoordinatorGroup = -60; $shiftCoordinatorGroup = -40;
$bureaucratGroup = -40; $bureaucratGroup = -60;
$userQuestionsId = $db->table('Privileges')->where('name', 'user_questions')->first()->id; $userQuestionsId = $db->table('Privileges')->where('name', 'user_questions')->first()->id;
$adminQuestionsId = $db->table('Privileges')->where('name', 'admin_questions')->first()->id; $adminQuestionsId = $db->table('Privileges')->where('name', 'admin_questions')->first()->id;
$db->table('GroupPrivileges')->insert([ $db->table('GroupPrivileges')->insert([

Loading…
Cancel
Save