REVE-37: Prevent modifications to feature based enrollment user partitions

This commit is contained in:
Gabe Mulley
2018-11-19 08:37:48 -05:00
parent 4826b69035
commit 5177e994c8
10 changed files with 93 additions and 26 deletions

View File

@@ -23,7 +23,8 @@ function(Backbone, _, gettext, GroupModel, GroupCollection) {
]),
showGroups: false,
editing: false,
usage: []
usage: [],
read_only: false
};
},
@@ -78,7 +79,8 @@ function(Backbone, _, gettext, GroupModel, GroupCollection) {
scheme: this.get('scheme'),
description: this.get('description'),
version: this.get('version'),
groups: this.get('groups').toJSON()
groups: this.get('groups').toJSON(),
read_only: this.get('read_only')
};
},

View File

@@ -101,7 +101,8 @@ define([
name: 'Group 2',
usage: []
}
]
],
read_only: true
},
clientModelSpec = {
id: 10,
@@ -124,7 +125,8 @@ define([
usage: []
}
],
usage: []
usage: [],
read_only: true
},
model = new GroupConfigurationModel(
serverModelSpec, {parse: true}

View File

@@ -7,8 +7,7 @@ function($, _, gettext, BasePage, GroupConfigurationsListView, PartitionGroupLis
var GroupConfigurationsPage = BasePage.extend({
initialize: function(options) {
var currentScheme,
i,
enrollmentScheme = 'enrollment_track';
i;
BasePage.prototype.initialize.call(this);
this.experimentsEnabled = options.experimentsEnabled;
@@ -26,7 +25,7 @@ function($, _, gettext, BasePage, GroupConfigurationsListView, PartitionGroupLis
this.allGroupViewList.push(
new PartitionGroupListView({
collection: this.allGroupConfigurations[i].get('groups'),
restrictEditing: currentScheme === enrollmentScheme,
restrictEditing: this.allGroupConfigurations[i].get('read_only'),
scheme: currentScheme
})
);