diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html index 115b3cb97..0c7c74d84 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html @@ -1,4 +1,7 @@ + + diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html index f4c655122..704cb068c 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html @@ -109,3 +109,9 @@
+ + diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js index 710fa5c85..f0466dc45 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js @@ -113,14 +113,8 @@ $(function() { this.editUserBox=function(user) { window.redbackModel.createUser=false; clearUserMessages(); - //$("#main-content #user-edit").remove(); - $("#main-content").append(""); - //$("#main-content #user-edit").attr("data-bind",'template: {name:"redback/user-edit-tmpl",data: user}'); $("#main-content #createUserForm").attr("data-bind",'template: {name:"redback/user-edit-tmpl",data: user}'); - //$("#main-content #user-create").remove(); - //$("#main-content #user-edit").show(); - var viewModel = new userViewModel(user); ko.applyBindings(viewModel,$("#main-content #createUserForm").get(0)); @@ -153,6 +147,17 @@ $(function() { user.update(); }); + $.ajax("restServices/redbackServices/roleManagementService/getEffectivelyAssignedRoles/"+user.username(), { + type: "GET", + async: false, + dataType: 'json', + success: function(data) { + $( "#user-edit-roles-view" ).append( jQuery("#user_edit_roles_tmpl" ).tmpl( data.role ) ); + $("#user-edit-roles-view").show(); + } + } + ); + } }