diff --git a/airsonic-main/src/main/java/org/airsonic/player/command/UserSettingsCommand.java b/airsonic-main/src/main/java/org/airsonic/player/command/UserSettingsCommand.java index 7b70be6a..2344b78d 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/command/UserSettingsCommand.java +++ b/airsonic-main/src/main/java/org/airsonic/player/command/UserSettingsCommand.java @@ -46,6 +46,7 @@ public class UserSettingsCommand { private List users; private boolean isAdmin; + private boolean isCurrentUser; private boolean isPasswordChange; private boolean isNewUser; private boolean isDeleteUser; @@ -166,6 +167,14 @@ public class UserSettingsCommand { isAdmin = admin; } + public boolean isCurrentUser() { + return isCurrentUser; + } + + public void setCurrentUser(boolean currentUser) { + isCurrentUser = currentUser; + } + public boolean isPasswordChange() { return isPasswordChange; } diff --git a/airsonic-main/src/main/java/org/airsonic/player/controller/UserSettingsController.java b/airsonic-main/src/main/java/org/airsonic/player/controller/UserSettingsController.java index b64a623b..073126ea 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/controller/UserSettingsController.java +++ b/airsonic-main/src/main/java/org/airsonic/player/controller/UserSettingsController.java @@ -87,6 +87,7 @@ public class UserSettingsController { UserSettings userSettings = settingsService.getUserSettings(user.getUsername()); command.setTranscodeSchemeName(userSettings.getTranscodeScheme().name()); command.setAllowedMusicFolderIds(Util.toIntArray(getAllowedMusicFolderIds(user))); + command.setCurrentUser(securityService.getCurrentUser(request).getUsername().equals(user.getUsername())); } else { command.setNewUser(true); command.setStreamRole(true); diff --git a/airsonic-main/src/main/webapp/WEB-INF/jsp/userSettings.jsp b/airsonic-main/src/main/webapp/WEB-INF/jsp/userSettings.jsp index 539a5983..b03210d2 100644 --- a/airsonic-main/src/main/webapp/WEB-INF/jsp/userSettings.jsp +++ b/airsonic-main/src/main/webapp/WEB-INF/jsp/userSettings.jsp @@ -63,7 +63,7 @@ - + @@ -136,7 +136,7 @@
- +