summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit
Commit message (Collapse)AuthorAgeFilesLines
* Updated to latest wicket milestone and fix upgrade errorsMartin Spielmann2016-11-1817-27/+32
| | | | | Some APIs changed like AjaxButton.onSubmit. All compile errors fixed and also RuntimeExceptions caused by wrong ajax event usages are resolved.
* Merge pull request #3 from gitblit/masterMartin Spielmann2016-11-1815-265/+743
|\ | | | | Get latest stuff from master before move forward with wicket-7
| * Merge pull request #1147 from tomaswolf/disabled_pager_linksJames Moger2016-11-142-2/+4
| |\ | | | | | | Fix disabled links in PagerPanel
| | * Fix disabled links in PagerPanelTom2016-10-312-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disabled links in the PagerPanel (used on the LuceneSearchPage to page through search results) were only rendered as "disabled". The links themselves remained active, which gives strange effects when clicked. For instance it was possible to move to result pages -1, -2, and so on. Really disable the links. Add missing CSS rules to have correct styling as Wicket renders disabled links as spans, not anchors. Include the new CSS file in BasePage.html. And add the left/right arrows only if not on the first/last page.
| * | Merge pull request #1149 from fzs/fixLDAPbindingJames Moger2016-11-141-114/+284
| |\ \ | | |/ | |/| Fix LDAP binding strategies
| | * Clean up `LdapAuthProvider` to properly cover different LDAP search scenarios.Florian Zschocke2016-11-111-114/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gitblit allows in its configuration to set a "manager" user (and password) which can be used to search for the entry of a user wanting to log in. If they are both not set, an anonymous search is attempted. In the description below, when I say "...as manager", it is either as manager or anonymous. So far the behaviour of Gitblit, with respect to binding to and searching in LDAP, has been the following when a user logs in: **bind as manager** **search for the user** _bind as the user_ _search for the teams_ I'll call this code flow A. Later an additional configuration option had been added: `realm.ldap.bindpattern`. (PR gitblit/gitblit#162) It was meant to allow for not using a manager nor anonymous binds, by searching the directory as the user logging in. This is done in code flow B: **bind as manager** _bind as user_ _search for user_ _search for teams_ Both A and B are flawed, I think. In A, it looks like a mistake to me that the binding stays with the user after authentication. The problem that this causes is, that in LDAP server configurations where normal users are not allowed to read groups, the team information cannot be retrieved. I tried but failed to understand how B is supposed to work. There will always be a bind request as either anonymous or the manager DN when the LDAP connection is created. If neither is possible, the authentication process will fail and the user cannot log in. When synchronizing users and teams from LDAP, the following code flow is exercised: F: **bind as manager** **search for users** **search for teams** This patch fixes both code flows by introducing a new flow. C: **bind as manager** **search for user** _bind as user to authenticate_ **bind as manager** **search for teams** And it changes code flow B to the following code flow D: _bind as user_ _search for user_ _search for teams_ With code flows A, C, D and F the following usage (and authentication) scenarios are covered. They are described from the view of a Gitblit administrator's intent and his LDAP setup. * Users and team should be snychronized with LDAP This means anonymous or a fixed account must be able to read users and groups. => covered by C and F As the above allows for authentication and is required for synchronisation, all the others below do not cover synchronization. * No anonymous binding allowed and no special manager binding required This means that users must be able to read user an group entries. => covered by D * The user DN needs to be searched, e.g. because they are not all under the same parent DN. This means that anonymous or a fixed account must be able to read users. -- anonymous or the "manager" account can also read groups => covered by C -- anonymous or the "manager" account cannot read groups but a user can => covered by A I therefore believe that the new code will cover all common use cases. The implementation either directly binds as the user, when `bindpattern` is not empty, or it binds anonymous or against the manger DN to search for the user DN entry. If it directly bound against the user DN, the user is already authenticated. It will then only check that the user DN it found in the search is identical to the one it is currently bound against. If it was bound against a manager DN (or anonymously) it will bind against the found user DN to authenticate the user logging in, and will then rebind against the manager DN. When searching for groups in LDAP, if the search fails with a result code other than SUCCESS, the implementation will bind against the user DN, if it isn't already bound against it. It will then repeat the search for groups under the user authorization. This is to keep backwards compatible with the original behaviour A, in order to not break cases where the LDAP setup would deny a manager account to search for groups but allow it for normal users. To achieve this the implementation introduces an internal `LdapConnection` class that wraps the connection and keeps bind state, so that a rebind as a user is possible. This also fixes a resource leak where the connection was not closed in case that the initial bind as the manager account did not succeed. This commit would fix gitblit/gitblit#920
| * | Merge pull request #1144 from fzs/logSendFailedExceptionJames Moger2016-10-281-1/+16
| |\ \ | | | | | | | | Improve logging when sending email fails.
| | * | Improve logging when sending email fails.merged-logSendFailedExceptionFlorian Zschocke2016-10-271-1/+16
| | |/
| * | Merge pull request #1142 from fzs/merge-strategyJames Moger2016-10-289-70/+336
| |\ \ | | | | | | | | Merge strategy
| | * | Add merge type setting to repository page.merged--merge-strategyFlorian Zschocke2016-10-283-1/+10
| | | | | | | | | | | | | | | | The merge type is a per repository setting. Add it to the edit page.
| | * | Add integration strategy to merge tickes fast-forward or with commit.Florian Zschocke2016-10-286-69/+326
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the option to merge a ticket branch to the integration branch only when it can be fast-forwarded, or always with a merge commit, or by fast-foward if possible, otherwise with a merge commit. Adds a new property ticket.mergeType with the valid values FAST_FOWARD_ONLY, MERGE_ALWAYS and MERGE_IF_NECESSARY. Merging and canMerge were refactored to make use of a new IntegrationStrategy class for each type of strategy.
| * | Issue #1076: load commit cache in a background threadTom2016-10-273-78/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make the CommitCache fully thread-safe. It was using a ConcurrentHashMap containing lists, but then handed out these lists. It also did multiple operations on that map that as a whole should be atomic. * Use isEmpty() instead of size() == 0. * Run the loading of the commit cache in a background daemon thread
* | | Merge pull request #2 from gitblit/masterMartin Spielmann2016-09-282-714/+725
|\| | | | | | | | merge updates from gitblit master into this wicket-7 branch
| * | Spelling mistake fixlarsmaes2016-09-161-1/+1
| | | | | | | | | pushedNewBranch was wrongly spelled
| * | 1.8.x tranditional chinese translationwilliam2016-08-041-27/+21
| | |
| * | 1.8.x tranditional chinese translation after user experiencewilliam2016-08-041-711/+728
| |/
* | Fix bootstrap and angular resourcesMartin Spielmann2016-07-314-7/+45
| |
* | fix octiconsMartin Spielmann2016-07-3110-19/+917
| |
* | fix fragment markup loading #1Martin Spielmann2016-07-3125-106/+106
| |
* | fix fragments on RepositoriesPanel #1Martin Spielmann2016-07-311-10/+10
| |
* | fix fontawesome and mount static resources (root folder)Martin Spielmann2016-07-31115-9/+2479
| |
* | mount fontawesomeMartin Spielmann2016-07-319-1/+681
| |
* | mount flotr and bootstrapMartin Spielmann2016-07-3129-93/+9834
| |
* | fixed last compile errors in pagesMartin Spielmann2016-07-3016-53/+72
| |
* | replaced ResourceStreamRequestTarget by ResourceStreamRequestHandlerMartin Spielmann2016-07-304-209/+222
| |
* | fix last broken panelMartin Spielmann2016-07-301-3/+3
| |
* | fix filter and plugin class resolverMartin Spielmann2016-07-302-98/+104
| |
* | replaced WicketURL[En/De]coder with Url[En/De]coderMartin Spielmann2016-07-306-15/+17
| |
* | more replacements for getRelativePathPrefixToContextRootMartin Spielmann2016-07-303-3/+5
| |
* | Replaced getRelativePathPrefixToContextRoot with method inMartin Spielmann2016-07-309-25/+53
| | | | | | GitBlitRequestUtils
* | replaced RequestUtils.toAbsolutePath() and RedirectRequestTargetMartin Spielmann2016-07-3012-53/+52
| |
* | removed GitBlitUrlCodingStrategyMartin Spielmann2016-07-302-223/+226
| |
* | updated package for RedirectToUrlExceptionMartin Spielmann2016-07-303-4/+19
| |
* | Replaced HeaderContributors by Behaviors and fixed PageParameter methodsMartin Spielmann2016-07-2920-240/+188
| |
* | Replaced SimpleAttributeModifier by AttributeModifierMartin Spielmann2016-07-2836-119/+128
| |
* | fix GiBlitWebApp (mostly...)Martin Spielmann2016-07-281-6/+8
| |
* | fix GitblitRedirectExceptionMartin Spielmann2016-07-281-10/+12
| |
* | started resolving compile errors. no functional changes made. onleMartin Spielmann2016-07-2821-79/+83
| | | | | | replacements like PageParameters.put -> PageParameters.add
* | replaced PageParameter imports which moved into another packageMartin Spielmann2016-07-2869-69/+69
|/
* Merge pull request #1087 from ↵Paul Martin2016-06-191-0/+1
|\ | | | | | | | | mereth/issues/964-session-loss-redirects-to-start-page Fixes #964 - add missing redirect after restoring user in new session
| * add missing redirect after restoring user in new sessionmereth2016-06-151-0/+1
| |
* | Merge pull request #1055 from gitblit/1048-TicketReferencesPaul Martin2016-06-189-200/+930
|\ \ | |/ |/| Ticket Reference handling #1048
| * Ticket Reference handling #1048Paul Martin2016-04-279-200/+930
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + Supports referencing: + Tickets from other tickets via comments + Tickets from commits on any branch + Common TicketLink class used for both commits and tickets + TicketLink is temporary and persisted to ticket as a Reference + Support deletion of ticket references + Rebasing patchsets/branches will generate new references + Deleting old patchsets/branches will remove the relevant references + Substantial testing of use cases + With and without patchsets, deleting, amending + BranchTicketService used during testing to allow end-to-end ref testing + Relocated common git helper functions to JGitUtils
* | fix baseURL handling in HttpUtils, fixes #1083Dirk Steinkopf2016-06-121-2/+14
| |
* | Fixes #1062 - Upgraded to Prosemirror 0.6.1Paul Martin2016-04-291-3/+2
| |
* | Merge pull request #1070 from gitblit/1061-filestoreSortByDatePaul Martin2016-04-282-3/+48
|\ \ | | | | | | Fixes #1061 - Most recent first on filestore page
| * | Fixes #1061 - Most recent first on filestore pagePaul Martin2016-04-282-3/+48
| |/
* / Use getInteger not getFilesize, fixes #1049James Moger2016-04-201-1/+1
|/
* fixes #966 to prevent always searching all reposPaul Martin2016-04-161-3/+6
|
* Fixes #1028 - FilestorePage now pages and filtersPaul Martin2016-04-083-20/+180
|