]> source.dussan.org Git - gitblit.git/commitdiff
Implemented support for toggling User.canFork in Manager
authorJames Moger <james.moger@gitblit.com>
Wed, 3 Oct 2012 21:31:37 +0000 (17:31 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 3 Oct 2012 21:31:37 +0000 (17:31 -0400)
src/com/gitblit/client/EditUserDialog.java

index 34ab4b5e5be1a02cba2110b9d0743a244e4dd623..88612b7924cae8f9c37d31af532a1c62f4d63a2b 100644 (file)
@@ -78,6 +78,8 @@ public class EditUserDialog extends JDialog {
        private JTextField emailAddressField;\r
 \r
        private JCheckBox canAdminCheckbox;\r
+       \r
+       private JCheckBox canForkCheckbox;\r
 \r
        private JCheckBox notFederatedCheckbox;\r
 \r
@@ -126,6 +128,7 @@ public class EditUserDialog extends JDialog {
                displayNameField = new JTextField(anUser.displayName == null ? "" : anUser.displayName, 25);\r
                emailAddressField = new JTextField(anUser.emailAddress == null ? "" : anUser.emailAddress, 25);\r
                canAdminCheckbox = new JCheckBox(Translation.get("gb.canAdminDescription"), anUser.canAdmin);           \r
+               canForkCheckbox = new JCheckBox(Translation.get("gb.canForkDescription"), anUser.canFork);              \r
                notFederatedCheckbox = new JCheckBox(\r
                                Translation.get("gb.excludeFromFederationDescription"),\r
                                anUser.excludeFromFederation);\r
@@ -145,6 +148,7 @@ public class EditUserDialog extends JDialog {
                fieldsPanel.add(newFieldPanel(Translation.get("gb.displayName"), displayNameField));\r
                fieldsPanel.add(newFieldPanel(Translation.get("gb.emailAddress"), emailAddressField));\r
                fieldsPanel.add(newFieldPanel(Translation.get("gb.canAdmin"), canAdminCheckbox));\r
+               fieldsPanel.add(newFieldPanel(Translation.get("gb.canFork"), canForkCheckbox));\r
                fieldsPanel.add(newFieldPanel(Translation.get("gb.excludeFromFederation"),\r
                                notFederatedCheckbox));\r
 \r
@@ -306,6 +310,7 @@ public class EditUserDialog extends JDialog {
                user.emailAddress = emailAddressField.getText().trim();\r
 \r
                user.canAdmin = canAdminCheckbox.isSelected();\r
+               user.canFork = canForkCheckbox.isSelected();\r
                user.excludeFromFederation = notFederatedCheckbox.isSelected();\r
 \r
                user.repositories.clear();\r