Browse Source

WindowsAuthProvider setting to restrict BUILTIN\Administrators

Some environments do not want to automatically allow Windows admin
accounts to be Gitblit admins.  This patch allows disabling/enabling the
relationship between Windows builtin admin accounts and Gitblit accounts.
tags/v1.4.0
James Moger 10 years ago
parent
commit
fa38a155cf

+ 2
- 0
releases.moxie View File

- Support Markdown image links relative to the repository root (issue-324) - Support Markdown image links relative to the repository root (issue-324)
- Added filesystem write permission check (issue-345) - Added filesystem write permission check (issue-345)
- Added GO launch parameter for redirecting logging to a rolling, daily log file (issue-348) - Added GO launch parameter for redirecting logging to a rolling, daily log file (issue-348)
- Added settings to Windows authentication provider to permit/prohibit BUILTIN\Administrators from being Gitblit Admins (issue-354)
- Support rendering confluence, mediawiki, textile, tracwiki, and twiki markup documents - Support rendering confluence, mediawiki, textile, tracwiki, and twiki markup documents
- Added setting to globally disable anonymous pushes in the receive pack - Added setting to globally disable anonymous pushes in the receive pack
- Added a normalized diffstat display to the commit, commitdiff, and compare pages - Added a normalized diffstat display to the commit, commitdiff, and compare pages
- { name: 'realm.ldap.synchronize', defaultValue: 'false' } - { name: 'realm.ldap.synchronize', defaultValue: 'false' }
- { name: 'realm.ldap.syncPeriod', defaultValue: '5 MINUTES' } - { name: 'realm.ldap.syncPeriod', defaultValue: '5 MINUTES' }
- { name: 'realm.ldap.removeDeletedUsers', defaultValue: 'true' } - { name: 'realm.ldap.removeDeletedUsers', defaultValue: 'true' }
- { name: 'realm.windows.permitBuiltInAdministrators', defaultValue: 'true' }
- { name: 'web.commitMessageRenderer', defaultValue: 'plain' } - { name: 'web.commitMessageRenderer', defaultValue: 'plain' }
- { name: 'web.documents', defaultValue: 'readme home index changelog contributing submitting_patches copying license notice authors' } - { name: 'web.documents', defaultValue: 'readme home index changelog contributing submitting_patches copying license notice authors' }
- { name: 'web.showBranchGraph', defaultValue: 'true' } - { name: 'web.showBranchGraph', defaultValue: 'true' }

+ 6
- 0
src/main/distrib/data/gitblit.properties View File

# SINCE 1.3.0 # SINCE 1.3.0
realm.windows.allowGuests = false realm.windows.allowGuests = false
# Allow user accounts belonging to the BUILTIN\Administrators group to be
# Gitblit administrators.
#
# SINCE 1.4.0
realm.windows.permitBuiltInAdministrators = true
# The default domain for authentication. # The default domain for authentication.
# #
# If specified, this domain will be used for authentication UNLESS the supplied # If specified, this domain will be used for authentication UNLESS the supplied

+ 5
- 3
src/main/java/com/gitblit/auth/WindowsAuthProvider.java View File

groupNames.add(group.getFqn()); groupNames.add(group.getFqn());
} }


if (groupNames.contains("BUILTIN\\Administrators")) {
// local administrator
user.canAdmin = true;
if (settings.getBoolean(Keys.realm.windows.permitBuiltInAdministrators, true)) {
if (groupNames.contains("BUILTIN\\Administrators")) {
// local administrator
user.canAdmin = true;
}
} }


// TODO consider mapping Windows groups to teams // TODO consider mapping Windows groups to teams

Loading…
Cancel
Save