mirror of https://github.com/apache/archiva.git
update user roles looks to work :-)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1230556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4812edab08
commit
173bb19544
|
@ -202,6 +202,24 @@ $(function() {
|
|||
}
|
||||
}
|
||||
|
||||
this.updateAssignedRoles=function(){
|
||||
$.log("user#updateAssignedRoles");
|
||||
var curUser = this;
|
||||
$.ajax("restServices/redbackServices/roleManagementService/updateUserRoles", {
|
||||
data: "{\"user\": " + ko.toJSON(this)+"}",
|
||||
contentType: 'application/json',
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
displaySuccessMessage($.i18n.prop("user.roles.updated",curUser.username()));
|
||||
},
|
||||
error: function(result) {
|
||||
var obj = jQuery.parseJSON(result.responseText);
|
||||
displayRedbackError(obj);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.i18n = $.i18n.prop;
|
||||
}
|
||||
|
||||
|
|
|
@ -206,8 +206,7 @@ $(function() {
|
|||
this.applicationRoles = ko.observableArray(new Array());
|
||||
|
||||
updateUserRoles=function(){
|
||||
$.log("updateUserRoles assigned:"+this.user.assignedRoles().length);
|
||||
|
||||
this.user.updateAssignedRoles();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue