From a0c34e37fe8e456a21c7a57e9d45e637ab40cce8 Mon Sep 17 00:00:00 2001
From: Florian Zschocke <florian.zschocke@cycos.com>
Date: Mon, 12 Aug 2013 16:32:12 -0400
Subject: [PATCH] Add an Apache htpasswd user service

---
 src/main/distrib/data/gitblit.properties |  188 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 179 insertions(+), 9 deletions(-)

diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties
index 82e77f3..9be7f64 100644
--- a/src/main/distrib/data/gitblit.properties
+++ b/src/main/distrib/data/gitblit.properties
@@ -500,6 +500,9 @@
 #    com.gitblit.LdapUserService
 #    com.gitblit.RedmineUserService
 #    com.gitblit.SalesforceUserService
+#    com.gitblit.WindowsUserService
+#    com.gitblit.PAMUserService
+#    com.gitblit.HtpasswdUserService
 #
 # Any custom user service implementation must have a public default constructor.
 #
@@ -529,6 +532,53 @@
 #
 # SINCE 0.5.0
 web.siteName =
+
+# You may specify a different logo image for the header but it must be 120x45px.
+# If the specified file does not exist, the default Gitblit logo will be used.
+#
+# SINCE 1.3.0
+# BASEFOLDER
+web.headerLogo = ${baseFolder}/logo.png
+
+# You may specify a custom header background CSS color.  If unspecified, the
+# default color will be used.
+#
+# e.g. web.headerBackgroundColor = #002060
+#
+# SINCE 1.3.0
+web.headerBackgroundColor =
+
+# You may specify a custom header foreground CSS color.  If unspecified, the
+# default color will be used.
+#
+# e.g. web.headerForegroundColor = white
+#
+# SINCE 1.3.0
+web.headerForegroundColor =
+
+# You may specify a custom header foreground hover CSS color.  If unspecified, the
+# default color will be used.
+#
+# e.g. web.headerHoverColor = white
+#
+# SINCE 1.3.0
+web.headerHoverColor =
+
+# You may specify a custom header border CSS color.  If unspecified, the default
+# color will be used.
+#
+# e.g. web.headerBorderColor = #002060
+#
+# SINCE 1.3.0
+web.headerBorderColor =
+
+# You may specify a custom header border CSS color.  If unspecified, the default
+# color will be used.
+#
+# e.g. web.headerBorderFocusColor = #ff9900
+#
+# SINCE 1.3.0
+web.headerBorderFocusColor =
 
 # If *web.authenticateAdminPages*=true, users with "admin" role can create
 # repositories, create users, and edit repository metadata.
@@ -567,6 +617,13 @@
 # SINCE 1.0.0
 # BASEFOLDER
 web.robots.txt = ${baseFolder}/robots.txt
+
+# The number of minutes to cache a page in the browser since the last request.
+# The default value is 0 minutes.  A value <= 0 disables all page caching which
+# is the default behavior for Gitblit <= 1.3.0.
+#
+# SINCE 1.3.1
+web.pageCacheExpires = 0
 
 # If true, the web ui layout will respond and adapt to the browser's dimensions.
 # if false, the web ui will use a 940px fixed-width layout.
@@ -814,11 +871,43 @@
 # SINCE 0.5.0 
 web.generateActivityGraph = true
 
-# The number of days to show on the activity page.
-# Value must exceed 0 else default of 14 is used
+# The default number of days to show on the activity page.
+# Value must exceed 0 else default of 7 is used
 #
 # SINCE 0.8.0
-web.activityDuration = 14
+web.activityDuration = 7
+
+# Choices for days of activity to display.
+#
+# SPACE-DELIMITED
+# SINCE 1.3.0
+web.activityDurationChoices = 1 3 7 14 21 28
+
+# Maximum number of days of activity that may be displayed on the activity page.
+#
+# SINCE 1.3.2
+web.activityDurationMaximum = 30
+
+# The number of days of commits to cache in memory for the dashboard, activity,
+# and project pages.  A value of 0 will disable all caching and will parse commits
+# in each repository per-request.  If the value > 0 these pages will try to fulfill
+# requests using the commit cache.  If the request specifies a period which falls
+# outside the commit cache window, then the cache will be ignored and the request
+# will be fulfilled by brute-force parsing all relevant commits per-repository.
+#
+# Consider the values specified for *web.activityDurationChoices* when setting
+# the cache size AND consider adjusting the JVM -Xmx heap parameter appropriately.
+#
+# SINCE 1.3.0
+# RESTART REQUIRED
+web.activityCacheDays = 14
+
+# Case-insensitive list of authors to exclude from metrics.  Useful for
+# eliminating bots.
+#
+# SPACE-DELIMITED
+# SINCE 1.3.0
+web.metricAuthorExclusions =
 
 # The number of commits to display on the summary page
 # Value must exceed 0 else default of 20 is used
@@ -840,17 +929,17 @@
 # SINCE 0.5.0
 web.itemsPerPage = 50
 
-# The number of pushes to display on the overview page
+# The number of reflog changes to display on the overview page
 # Value must exceed 0 else default of 5 is used
 #
 # SINCE 1.3.0
-web.overviewPushCount = 5
+web.overviewReflogCount = 5
 
-# The number of pushes to show on a push page before show the first, prev, next
-# pagination links.  A default of 10 is used for any invalid value.
+# The number of reflog changes to show on a reflog page before show the first,
+#  prev, next pagination links.  A default of 10 is used for any invalid value.
 #
 # SINCE 1.3.0
-web.pushesPerPage = 10
+web.reflogChangesPerPage = 10
 
 # Registered file extensions to ignore during Lucene indexing
 #
@@ -1097,18 +1186,99 @@
 # Advanced Realm Settings
 #
 
+# Auto-creates user accounts based on the servlet container principal.  This
+# assumes that your Gitblit install is a protected resource and your container's
+# authentication process intercepts all Gitblit requests.
+#
+# SINCE 1.3.0
+realm.container.autoCreateAccounts = false
+
+# The WindowsUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# RESTART REQUIRED
+# BASEFOLDER
+# SINCE 1.3.0
+realm.windows.backingUserService = ${baseFolder}/users.conf
+
+# Allow or prohibit Windows guest account logins
+#
+# SINCE 1.3.0
+realm.windows.allowGuests = false
+
+# The default domain for authentication.
+#
+# If specified, this domain will be used for authentication UNLESS the supplied
+# login name manually specifies a domain (.e.g. mydomain\james or james@mydomain)
+#
+# If unspecified, the username must be specified in UPN format (name@domain).
+#
+# if "." (dot) is specified, ONLY the local account database will be used.
+#
+# SINCE 1.3.0
+realm.windows.defaultDomain =
+
+# The PAMUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# RESTART REQUIRED
+# BASEFOLDER
+# SINCE 1.3.1
+realm.pam.backingUserService = ${baseFolder}/users.conf
+
+# The PAM service name for authentication.
+# default: system-auth
+#
+# SINCE 1.3.1
+realm.pam.serviceName = system-auth
+
+# The HtpasswdUserService must be backed by another user service for standard user
+# and team management and attributes. This can be one of the local Gitblit user services.
+# default: users.conf
+#
+# RESTART REQUIRED
+# BASEFOLDER
+# SINCE 1.3.2
+realm.htpasswd.backingUserService = ${baseFolder}/users.conf
+
+# The Apache htpasswd file that contains the users and passwords.
+# default: ${baseFolder}/htpasswd
+#
+# RESTART REQUIRED
+# BASEFOLDER
+# SINCE 1.3.2
+realm.htpasswd.userfile = ${baseFolder}/htpasswd
+
+#  Determines how accounts are looked up upon login.
+#
+# If set to false, then authentication for local accounts is done against
+# the backing user service.
+# If set to true, then authentication will first be checked against the
+# htpasswd store, even if the account appears as a local account in the
+# backing user service. If the user is found in the htpasswd store, then
+# an already existing local account will be turned into an external account.
+# In this case an initial local password is never used and gets overwritten
+# by the externally stored password upon login.
+# default: false
+#
+# SINCE 1.3.2
+realm.htpasswd.overrideLocalAuthentication = false
+
 # The SalesforceUserService must be backed by another user service for standard user
 # and team management.
 # default: users.conf
 #
 # RESTART REQUIRED
 # BASEFOLDER
+# SINCE 1.3.0
 realm.salesforce.backingUserService = ${baseFolder}/users.conf
 
 # Restrict the Salesforce user to members of this org.
 # default: 0 (i.e. do not check the Org ID)
 #
-# RESTART REQUIRED
+# SINCE 1.3.0
 realm.salesforce.orgId = 0
 
 # URL of the LDAP server.

--
Gitblit v1.9.1