Browse Source

fixed some bugs in whitelist rendering and saving

pull/779/head
Justin Richer 10 years ago
parent
commit
d570497b16
  1. 8
      openid-connect-server-webapp/src/main/webapp/resources/js/admin.js
  2. 2
      openid-connect-server-webapp/src/main/webapp/resources/js/whitelist.js

8
openid-connect-server-webapp/src/main/webapp/resources/js/admin.js

@ -738,9 +738,7 @@ var AppRouter = Backbone.Router.extend({
this.updateSidebar('admin/whitelists');
////
var whiteList = this.whiteListList.get(id);
whiteList = new WhiteListModel({id: id});
var whiteList = new WhiteListModel();
var client = this.clientList.get(cid);
if (!client) {
@ -751,6 +749,10 @@ var AppRouter = Backbone.Router.extend({
view.load(
function() {
// set the scopes on the model now that everything's loaded
whiteList.set({allowedScopes: client.get('scope')}, {silent: true});
$('#content').html(view.render().el);
view.delegateEvents();
setPageTitle($.t('whitelist.manage'));

2
openid-connect-server-webapp/src/main/webapp/resources/js/whitelist.js

@ -341,7 +341,7 @@ var WhiteListFormView = Backbone.View.extend({
// process allowed scopes
var allowedScopes = this.scopeCollection.pluck("item");
this.model.set(this.options.client.get('clientId'));
this.model.set({clientId: this.options.client.get('clientId')}, {silent: true});
var valid = this.model.set({
allowedScopes: allowedScopes

Loading…
Cancel
Save