Description:
update options
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r615:1e667e9af902 - - 2 files changed: 17 inserted, 1 deleted
@@ -0,0 +1,16 | |||
|
1 | + class AddConfigViewTest < ActiveRecord::Migration | |
|
2 | + def up | |
|
3 | + GraderConfiguration.create key: 'right.view_testcase', value_type: 'boolean', value:'true', description:'When true, any user can view/download test data' | |
|
4 | + #uglily and dirtily and shamelessly check other config and inifialize | |
|
5 | + GraderConfiguration.where(key: 'right.user_hall_of_fame').first_or_create(value_type: 'boolean', value: 'false', | |
|
6 | + description: 'If true, any user can access hall of fame page.') | |
|
7 | + GraderConfiguration.where(key: 'right.multiple_ip_login').first_or_create(value_type: 'boolean', value: 'false', | |
|
8 | + description: 'When change from true to false, a user can login from the first IP they logged into afterward.') | |
|
9 | + GraderConfiguration.where(key: 'right.user_view_submission').first_or_create(value_type: 'boolean', value: 'false', | |
|
10 | + description: 'If true, any user can view submissions of every one.') | |
|
11 | + end | |
|
12 | + | |
|
13 | + def down | |
|
14 | + GraderConfiguration.where(key: 'right.view_testcase').destroy_all; | |
|
15 | + end | |
|
16 | + end |
@@ -11,7 +11,7 | |||
|
11 | 11 | # |
|
12 | 12 | # It's strongly recommended to check this file into your version control system. |
|
13 | 13 | |
|
14 |
- ActiveRecord::Schema.define(:version => 201610 |
|
|
14 | + ActiveRecord::Schema.define(:version => 20161031063337) do | |
|
15 | 15 | |
|
16 | 16 | create_table "announcements", :force => true do |t| |
|
17 | 17 | t.string "author" |
You need to be logged in to leave comments.
Login now