Commit Graph

2108 Commits

Author SHA1 Message Date
Eduard Heimbuch
cf4d9cf20f 3.x
Committed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Pushed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-11-30 17:02:44 +01:00
Rene Pfeuffer
571e6ad92f Add a modifications provider for hooks
This new modifications provider consistently computes the modifications caused by a push to a branch. In contrast to the changeset provider that often has been used before to check what has changed, this also works for forced updates, rebased branches and fast-forwards.&#10;&#10;Because these types of changes are normally only used with git, this provider (for now) has only been implemented for git.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Pushed-by: Alexander Dammeier<alexander.dammeier@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-11-16 13:18:40 +01:00
Florian Scholdei
a8c32b10de Preferred checkout variant
Add ability to prioritize the repository checkout variants. These are displayed sorted.

Co-authored-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Pushed-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Co-authored-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Pushed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
2023-11-15 13:27:48 +01:00
Eduard Heimbuch
8dc0041e17 Remove mail for anonymous user 2023-11-13 16:19:15 +01:00
Thomas Zerr
123fc4c3d1 Invalidation of caches and search index
In the general admin settings, the user can find two button to either invalidate the cache or rebuild the search index.&#10;&#10;The endpoints are defined in the InvalidationResource class in scm-webapp.

Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-11-02 10:51:32 +01:00
Rene Pfeuffer
d0f8161220 Add functionality to modify repository storage locations
The repository location resolver gets a new function&#10;that allows to change the location of a repository.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-10-13 10:23:29 +02:00
Rene Pfeuffer
2ca68c43b3 Add update steps for namespaces
This adds a new update step API dedicated&#10;to handle namespace related data.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-10-05 11:00:20 +02:00
Thomas Zerr
0dc738d849 Added autoMask property
The AuditEntry annotation recevied a new property called autoMask. If that property is set to true, then fields get automatically masked in the audit log, if the field name contain certain phrases.

Co-authored-by: Thomas Zerr<thomas.zerr@cloudogu.com>
Pushed-by: Thomas Zerr<thomas.zerr@cloudogu.com>


Reviewed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-10-04 14:25:35 +02:00
Rene Pfeuffer
d2a0525b0b Catch exception when repositories are deleted
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-09-19 09:30:14 +02:00
Thomas Zerr
b2472d85d0 Added force to push command for git and hg repos
Committed-by: Rene Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-09-14 20:28:37 +02:00
Eduard Heimbuch
93a23466ff Fix cypress by using new stage "TESTING"
Cypress did not work because of the stricter security header. We introduced a new stage named "TESTING" which ignores this security headers and allow testing tools to work as intended.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-09-08 15:19:54 +02:00
Thomas Zerr
1750eae2d1 Fix marshalling invalid XML characters
If someone tries to persist data with invalid XML characters, they now get filtered out.

Committed-by: Rene Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-08-10 14:20:07 +02:00
Eduard Heimbuch
c1d7230fbd Add "enable file search" flag on global config.
Make the repository file search deactivatable
via the global config. This feature could
overwhelm the server on repositories with
millions of file therefore it now can be turned off.

Committed-by: Rene Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-07-06 08:47:51 +02:00
Eduard Heimbuch
0e7a3ec53b Improve general performance
- Adjust logging
- Optimize cache speed
- Cleanup classes

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>

Reviewed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2023-06-28 14:18:18 +02:00
Eduard Heimbuch
cc54e2ce6b Caches for internal stores and files
This adds optional caches for configuration stores and
backing data files for data stores.

These stores can be enabled using the system properties
`scm.storeCache.enabled=true` and `scm.cache.dataFileCache.enabled=true`.

In addition, this adds the possibility to overwrite cache configurations
from the guice cache (see file `gcache.xml`) with system properties.
The maximum size of the external group cache for example can be
overwritten with the system property `scm.cache.externalGroups.maximumSize`.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-06-28 12:38:15 +02:00
Rene Pfeuffer
5c505457bb Implement delete for audit log wrapper
This fixes errors when deleting configurations.
The error occured during "unmirror" in the mirror plugin.

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-06-08 10:30:37 +02:00
Rene Pfeuffer
86b8be9f17 In-memory implementations of the store api using JaxB
The new implementations are ment to be used in test
classes replacing the older implementations like
`InMemoryConfigurationStoreFactory`. The benefit
of these new classes is that the serialization using JaxB
is testet implicitly avoiding mistakes made with XML
annotations on the data classes.

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-06-07 10:04:50 +02:00
Eduard Heimbuch
a50e456969 Ignore duplicate contributors for single changeset
Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-05-25 19:26:38 +02:00
Konstantin Schaper
b812922142 Implement namespace configurations & permissions
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>

Reviewed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2023-05-25 18:51:29 +02:00
Eduard Heimbuch
c6df84557b Refactor general configuration
Use standard configuration store api for general configuration. This is best practice and also required for the audit log to work properly.

Besides that we still need to load the general configuration manually for the instance injection binding in ScmServletModules. Since the instance injection does not resolve the bindings regularly we need also still need to update the injectable scm config using the "load" hack in the resource.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-04-12 12:37:52 +02:00
Eduard Heimbuch
aa78cb6f03 Cleanup hg permissions 2023-04-11 09:02:09 +02:00
Rene Pfeuffer
8eb2687e10 Fix branch and tag name validation
The validation for branch and tag names has been
too limited. This led to errors in the frontend for
branches, that had been created using the
cli tools for git or hg but have not been seen as
valid by SCM-Manager.

To fix this, the patterns to validate branch and
tag names are relaxed and relate to the git
rules (https://git-scm.com/docs/git-check-ref-format).
Because these rules could not be expressed
using regular expressions alone, in addition
possible exceptions will be handled in the
git branch and tag commands.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-04-05 11:45:15 +02:00
Eduard Heimbuch
026ffa18fd Replace static mercurial permission handling
Replace our own hg permission handling with the default hg permission which is controlled by the `web` config
2023-04-03 09:47:15 +02:00
Rene Pfeuffer
796330f883 Fix NotFoundExceptions with SVN externals
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-03-21 16:10:04 +01:00
Eduard Heimbuch
b511789620 Fix audit log issues:
- Use store name as label for repository related changes if no explicit labels are set.
- Introduce 'ignore' flag
- Fix missing call to store
- Create audit logs for permissions
- Set flex attributes for input field to use full available space

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-03-21 12:03:51 +01:00
Eduard Heimbuch
56265be9a2 Add initial audit log API
Introduce audit log API which logs all creations,
modifications and deletions of annotated entities
and everything which is stored inside a
ConfigurationStore. Without the related Audit
Log Plugin installed this API does nothing.
2023-03-09 11:25:33 +01:00
Rene Pfeuffer
83c7e0523d Fix various performance issues
- Avoiding read attempts for stores that do not exist (AbstractStore).
- Use of ReadWrite locks (everything withLockedFileForRead or withLockedFileForWrite)
- Caching of JAXB Context (TypedStoreContext.java)
- Avoid unnecessary writes to the UserGroupCache

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-03-02 11:05:04 +01:00
Eduard Heimbuch
f28eaeca15 Fix repository resolution for ssh urls with context path
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-02-23 10:57:43 +01:00
Rene Pfeuffer
0361ae3c6c Sets the default branch for a new git repository from an import to the HEAD reference of the imported repository.
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2023-02-23 10:10:33 +01:00
Rene Pfeuffer
e1b107849e Permission Overview
Adds an overview of the permissions of a user including its groups. To do so, a new cache is introduced that stores the groups of a user, when the user is authenticated. In doing so, SCM-Manager can also list groups assigned by external authentication plugins such as LDAP. On the other hand, the user has to have been logged in at least once to get external groups, and even then the cached groups may be out of date when the overview is created. Internal groups will always be added correctly, nonetheless.

Due to the cache, another problem arised: On some logins, the xml dao for the cache failed to be read, because it was read and written at the same time. To fix this, a more thorough synchronization of the stores has been implemented.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-02-09 10:29:05 +01:00
Eduard Heimbuch
eb044d8953 Make the default encryption util public to access from plugins. 2023-02-07 14:59:41 +01:00
Eduard Heimbuch
ac419daa3f Add ConfigurationAdapterBase and extension points for trash bin
Adds the new abstract class ConfigurationAdapterBase to simplify the creation of global configuration views. In addition there is some cleanup, interfaces and extension points for the repository trash bin plugin.

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-01-13 13:08:51 +01:00
Konstantin Schaper
7b933c6821 Improve plugin center error feedback and cache invalidation (#2147)
The plugin center cache was not invalidated when the proxy configuration was changed in the global settings. This caused stale and inconsistent state to be displayed to the user while there was no feedback that something was wrong.
2022-11-04 11:49:08 +01:00
René Pfeuffer
54081ccdc6 Git import with lfs support (#2133)
This adds the possibility to load files managed by lfs to the repository import of git repositories.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2022-10-25 09:14:40 +02:00
Konstantin Schaper
74702591ed Revert "Add feedback form (#1967)"
This reverts commit 4407dc6d8a.

# Conflicts:
#	scm-ui/ui-api/src/config.ts
#	scm-ui/ui-api/src/index.ts
#	scm-ui/ui-webapp/public/locales/en/commons.json
#	scm-ui/ui-webapp/src/containers/App.tsx
#	scm-ui/ui-webapp/src/containers/Feedback.tsx
2022-09-27 10:27:08 +02:00
René Pfeuffer
e17934ae09 Fix lazy loading in the source view (#2120)
The lazy loading feature implemented for git was broken,
because the repeated usage in the BrowserResultCollapser
has overwritten the request in the command. Therefore
the command could no longer update the cache in the
BrowseCommandBuilder.

To fix this, we now use a browse command factory (represented
by a simple supplier) that will create a dedicated command
implementation for each request issued in the collapser.
2022-09-14 14:28:40 +02:00
René Pfeuffer
e0a56a1369 Implement commit search features for git (#2111)
Implements the required features for the commit search plugin for git.
2022-09-01 15:31:33 +02:00
Eduard Heimbuch
6055ba145f Remove cache for ChangesetsCommand since we do not want to use stale data here 2022-08-29 16:53:22 +02:00
Konstantin Schaper
56ace2811b Implement reindex mechanism for search (#2104)
Adds a new button to repository settings to allow users to manually delete and re-create search indices. The actual re-indexing is happening in plugins that subscribe to the newly created event.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-08-17 13:22:34 +02:00
Eduard Heimbuch
e590a3ee68 Add changesets command to enable commit search (#2106)
Introduce changesets command to find all changesets for a single repository. This is required to index all changesets for the commit search.
2022-08-17 12:44:59 +02:00
Eduard Heimbuch
550ebefd93 Context sensitive search (#2102)
Extend global search to search context-sensitive in repositories and namespaces.
2022-08-04 12:14:46 +02:00
René Pfeuffer
67a9dce7e6 Add namespace cli commands (#2093)
Adds the CLI commands that are available to handle repository permissions on repositories for namespaces.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-07-26 09:58:00 +02:00
René Pfeuffer
3b4b1a1767 Add cli commands to modify repository permissions (#2090)
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2022-07-20 09:17:14 +02:00
Eduard Heimbuch
fc28da90b3 Enable plugin management via CLI (#2087)
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2022-07-19 09:02:00 +02:00
Eduard Heimbuch
67c083ee54 Reduce code smells (#2089)
Reduce code smells found by deepsource.io. We focused on the low-hanging fruits and not breaking any api.
2022-07-15 15:33:37 +02:00
Florian Scholdei
f3f19426c8 Unify password validation (#2077)
Passwords should be checked when created or changed in the frontend just as they are in the backend for REST and CLI.
Also extend the password validation to allow upto 1024 characters instead of 32.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-07-07 11:19:51 +02:00
René Pfeuffer
b0b2375f78 Mirror LFS files for git (#2075)
If a mirrored git repository uses LFS, SCM-Manager will now also load the binaries, so that the mirrored repository can be used without missing LFS files.
2022-06-24 11:55:36 +02:00
René Pfeuffer
32dad5ffbf Do not close hg context for diff as string (#2067)
Normally, all resources (like the hg process) will be released after
the stream of the diff. But this may lead to errors, when
DiffCommandBuilder#getContent is used and other commands are used
afterwards.

So with this we introduce a new interface method in the DiffCommand
that can be implemented without closing resources. This method is
used for the computation of the diff as string.

We use this to distinguish between the computation of diffs as a
stream like in rest calls, and the computation as a single string
result that may we followed by other commands using the same context.
2022-06-13 08:19:28 +02:00
Eduard Heimbuch
084fe9e2ae Add api to overwrite content type resolver (#2051)
Introduce content type resolver extension to provide
custom content types for specific file extensions.
2022-06-07 11:02:56 +02:00
Eduard Heimbuch
4f83670824 Hardcode instance id for development instances (#2054)
We need this to recognize our development instances in the collected prometheus metrics.
2022-06-03 13:08:59 +02:00