From f163d0f1f9ffca9fa1c9a6d989198e198decdc04 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 31 Oct 2014 09:52:02 -0400 Subject: [PATCH] Only set mutable user access permissions --- releases.moxie | 1 + src/main/java/com/gitblit/wicket/pages/EditUserPage.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/releases.moxie b/releases.moxie index 41259a7d..2bca1a74 100644 --- a/releases.moxie +++ b/releases.moxie @@ -17,6 +17,7 @@ r27: { fixes: - Fix exception when viewing a ticket with a patchset where the integration branch does not exist (issue-521, ticket-212) - Fix exception when deleting a repository using the FileTicketService (issue-522, ticket-213) + - Do not inject team repository permissions as explicit user permissoins when editing a user (issue-462, ticket-214) changes: - Replaced Dagger with Guice (ticket-80) - Use release name as root directory in Gitblit GO artifacts (ticket-109) diff --git a/src/main/java/com/gitblit/wicket/pages/EditUserPage.java b/src/main/java/com/gitblit/wicket/pages/EditUserPage.java index 5ee2f9fd..c6b5c3c7 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditUserPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditUserPage.java @@ -178,7 +178,9 @@ public class EditUserPage extends RootSubPage { // update user permissions for (RegistrantAccessPermission repositoryPermission : permissions) { - userModel.setRepositoryPermission(repositoryPermission.registrant, repositoryPermission.permission); + if (repositoryPermission.mutable) { + userModel.setRepositoryPermission(repositoryPermission.registrant, repositoryPermission.permission); + } } Iterator selectedTeams = teams.getSelectedChoices(); -- 2.39.5