From 022ebb4010ecf91ef5049f0386ef398f1d7fb32b Mon Sep 17 00:00:00 2001 From: John Crygier <john.crygier@aon.com> Date: Mon, 07 May 2012 11:49:24 -0400 Subject: [PATCH] Change layout to BoxLayout (assuming window won't be resized) --- src/com/gitblit/GitBlit.java | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java index a616bef..f4a5ccc 100644 --- a/src/com/gitblit/GitBlit.java +++ b/src/com/gitblit/GitBlit.java @@ -388,6 +388,22 @@ /** * + * @return true if the user service supports display name changes + */ + public boolean supportsDisplayNameChanges() { + return userService.supportsDisplayNameChanges(); + } + + /** + * + * @return true if the user service supports email address changes + */ + public boolean supportsEmailAddressChanges() { + return userService.supportsEmailAddressChanges(); + } + + /** + * * @return true if the user service supports team membership changes */ public boolean supportsTeamMembershipChanges() { @@ -841,6 +857,12 @@ "gitblit", null, "mailingList"))); model.indexedBranches = new ArrayList<String>(Arrays.asList(config.getStringList( "gitblit", null, "indexBranch"))); + + // Custom defined properties + model.customFields = new HashMap<String, String>(); + for (String aProperty : config.getNames(Constants.CUSTOM_FIELDS_PROP_SECTION, Constants.CUSTOM_FIELDS_PROP_SUBSECTION)) { + model.customFields.put(aProperty, config.getString(Constants.CUSTOM_FIELDS_PROP_SECTION, Constants.CUSTOM_FIELDS_PROP_SUBSECTION, aProperty)); + } } model.HEAD = JGitUtils.getHEADRef(r); model.availableRefs = JGitUtils.getAvailableHeadTargets(r); @@ -1087,6 +1109,11 @@ updateList(config, "postReceiveScript", repository.postReceiveScripts); updateList(config, "mailingList", repository.mailingLists); updateList(config, "indexBranch", repository.indexedBranches); + + // User Defined Properties + for (Entry<String, String> singleProperty : repository.customFields.entrySet()) { + config.setString(Constants.CUSTOM_FIELDS_PROP_SECTION, Constants.CUSTOM_FIELDS_PROP_SUBSECTION, singleProperty.getKey(), singleProperty.getValue()); + } try { config.save(); @@ -1780,6 +1807,10 @@ */ private ServerSettings loadSettingModels() { ServerSettings settingsModel = new ServerSettings(); + settingsModel.supportsCredentialChanges = userService.supportsCredentialChanges(); + settingsModel.supportsDisplayNameChanges = userService.supportsDisplayNameChanges(); + settingsModel.supportsEmailAddressChanges = userService.supportsEmailAddressChanges(); + settingsModel.supportsTeamMembershipChanges = userService.supportsTeamMembershipChanges(); try { // Read bundled Gitblit properties to extract setting descriptions. // This copy is pristine and only used for populating the setting -- Gitblit v1.9.1