REVE-37: Prevent modifications to feature based enrollment user partitions
This commit is contained in:
@@ -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')
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user