diff --git a/keycloak-d4science-theme/src/main/resources/theme/d4science/admin/resources/js/user-avatar.js b/keycloak-d4science-theme/src/main/resources/theme/d4science/admin/resources/js/user-avatar.js deleted file mode 100644 index ff9ce26..0000000 --- a/keycloak-d4science-theme/src/main/resources/theme/d4science/admin/resources/js/user-avatar.js +++ /dev/null @@ -1,26 +0,0 @@ -module.service('UserAvatar', function(Auth) { - this.url = function(user, realm) { - return authUrl + '/realms/' + realm.realm + '/avatar-provider/admin/' + user.id + "?access_token=" + Auth.authz.token + "&" + + new Date().getTime(); - } -}); - -module.controller('UserAvatarCtrl', function($scope, $http, Notifications, UserAvatar) { - $scope.avatarUrl = UserAvatar.url($scope.user, $scope.realm); - - $scope.uploadAvatar = function(files) { - var fd = new FormData(); - //Take the first selected file - fd.append("image", files[0]); - - $http.post($scope.avatarUrl, fd, { - headers: {'Content-Type': undefined }, - transformRequest: angular.identity - }).then(function() { - Notifications.success("Your changes have been saved to the user."); - $scope.avatarUrl = UserAvatar.url($scope.user, $scope.realm); - }, function(error) { - console.error(error); - Notifications.error("Could not save the avatar"); - }); - } -}); diff --git a/keycloak-d4science-theme/src/main/resources/theme/d4science/admin/resources/partials/user-detail.html b/keycloak-d4science-theme/src/main/resources/theme/d4science/admin/resources/partials/user-detail.html deleted file mode 100644 index e24f233..0000000 --- a/keycloak-d4science-theme/src/main/resources/theme/d4science/admin/resources/partials/user-detail.html +++ /dev/null @@ -1,169 +0,0 @@ -