Commit Graph

11807 Commits

Author SHA1 Message Date
René Pfeuffer
c3a5dd4ffb Add page for import logs 2021-02-26 11:04:50 +01:00
René Pfeuffer
75ed038084 Use repository id as id for import log 2021-02-26 11:04:48 +01:00
René Pfeuffer
d42560aba3 Add log id to imported event 2021-02-26 10:48:06 +01:00
René Pfeuffer
8f5fcf6911 Guard import log 2021-02-26 10:42:35 +01:00
René Pfeuffer
8170d981cd Add unit test for log output 2021-02-26 10:42:35 +01:00
René Pfeuffer
b7fa1d77b2 Fix unit test for import resource 2021-02-26 10:42:35 +01:00
René Pfeuffer
51ed267ada Write import protocol at the end 2021-02-26 10:42:34 +01:00
René Pfeuffer
1b3320dfe9 Add permission check 2021-02-26 10:42:34 +01:00
René Pfeuffer
1d74df6596 Set repository type in log 2021-02-26 10:42:34 +01:00
René Pfeuffer
074f119a0d Add rest endpoint for import log 2021-02-26 10:42:34 +01:00
René Pfeuffer
33cddda172 Add logging for url and dump import 2021-02-26 10:42:34 +01:00
René Pfeuffer
468b37f725 Move import logic to dedicated classes 2021-02-26 10:42:34 +01:00
René Pfeuffer
bfb6a39631 Simple approach for import logs 2021-02-26 10:42:32 +01:00
Sebastian Sdorra
888f5d699b Fire RepositoryImportHookEvent instead of PostReceiveRepositoryHookEvent (#1561)
We will fire an RepositoryImportHookEvent instead of PostReceiveRepositoryHookEvent for repository imports with metadata. The event is only fired if all parts of the repository could be successfully imported. The extra event is required to avoid heavy recalculations which can be triggered by the PostReceiveRepositoryHookEvent for example the scm-statistic-plugin uses the PostReceiveRepositoryHookEvent to calculate its statistics.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-02-26 09:49:34 +01:00
René Pfeuffer
c8621061bf Overwrite files on import 2021-02-25 17:29:14 +01:00
René Pfeuffer
ff4d9224f9 Decrypt import only if password is given 2021-02-25 17:29:02 +01:00
Eduard Heimbuch
1ffeeb035d Improve translations for repository export permissions 2021-02-25 14:22:52 +01:00
Eduard Heimbuch
972cfd312b Small improvements on export information 2021-02-25 14:17:08 +01:00
Eduard Heimbuch
db2ce98721 Feature/import export encryption (#1533)
Add option to encrypt repository exports with a password and add possibility to decrypt them on repository import. Also make the repository export asynchronous. This implies that the repository export will be created on the server and can be downloaded multiple times. The repository export will be deleted automatically 10 days after creation.
2021-02-25 13:01:03 +01:00
Sebastian Sdorra
367d7294b8 Enable refetch on focus (#1559)
During the integration of react-query we had to disable the refetch on focus option, because it has cleared our input fields on refocusing the browser tab. This problem comes mostly from a wrong use of routes. Often routes were used with the component prop and a anonymous function e.g.:

```jsx
<Route path="/my/route" component={() => <AwesomeComponent />} />
```

This triggers not only rerendering but remounting of the route component every time the parent is rerendered. With the ongoing work on the migration from redux to react-query, we have removed the usage of routes with component functions. So we can now safely enable the option refetch on mount of react-query.
2021-02-25 08:30:23 +01:00
René Pfeuffer
3c94ce91d6 Set update step info for new repositories (#1554)
Sets versions for repository update steps to newest versions for new repositories to prevent unnecessary updates.
2021-02-25 08:12:16 +01:00
Konstantin Schaper
3a8d031ed5 Introduce stale while revalidate pattern (#1555)
This Improves the frontend performance with stale while
revalidate pattern.

There are noticeable performance problems in the frontend that
needed addressing. While implementing the stale-while-revalidate
pattern to display cached responses while re-fetching up-to-date
data in the background, in the same vein we used the opportunity
to remove legacy code involving redux as much as possible,
cleaned up many components and converted them to functional
react components.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-02-24 08:17:40 +01:00
Sebastian Sdorra
ad5c8102c0 Reenable SonarQube analysis for pull requests (#1556) 2021-02-23 10:22:37 +01:00
René Pfeuffer
ee02ba096f Mark config entry stores explicitly in exports (#1545)
The default (XML) store of SCM-Manager does not distinguish between config and config entry stores in regards to
storage locations. Nonetheless, we want to make a difference in export files, so that other store providers can handle
these stores differently. To do so, this change adds an attribute to the top level xml element of config entry stores
to mark them. In exports, these store files can now be exported in a different folder. To mark existing stores, this
introduces an update step.
2021-02-23 09:37:59 +01:00
Eduard Heimbuch
83a9c90130 Post receive hook after import (#1544)
Fire post receive repository hook event after pull from remote
and after unbundle (Git, HG and SVN)

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-02-22 09:20:15 +01:00
René Pfeuffer
eef74e3a50 Fix flappy test 2021-02-19 09:42:59 +01:00
René Pfeuffer
d0df8977ef Bugfix for long filenames in tar (#1552)
Fixes errors with long file names in tar archives. This may arise with hg repositories with deep directories.
2021-02-18 16:30:35 +01:00
Sebastian Sdorra
d8427ed4ed Improve cache api for usage in plugins (#1540)
This change allows usage of Cache as Shiro authentication and authorization cache. It will also fix loading cache configurations from plugins.
2021-02-17 09:15:01 +01:00
René Pfeuffer
20c3faeb5b Remove redundant chapter 2021-02-16 13:12:01 +01:00
Eduard Heimbuch
1e1b73ace5 Feature/import navigation lock (#1536)
Use navigation lock on repository import to prevent that the current user accidentally leaves the page and aborts the running import.
2021-02-16 11:35:06 +01:00
René Pfeuffer
ac3d9c9fa1 Fix sonar warning 2021-02-16 11:18:28 +01:00
René Pfeuffer
b8bd140934 Debug test failure 2021-02-16 10:18:09 +01:00
Eduard Heimbuch
fa46440960 Fix filter redirect on paginated overview page (#1535)
Fix unnecessary redirect on paginated overview pages which cuts the page number from url.
2021-02-16 08:05:09 +01:00
René Pfeuffer
3146e32a8e Remove unnecessary fields from dto 2021-02-15 16:24:36 +01:00
Eduard Heimbuch
5ea28a84fc Change file order inside repository archive (#1538)
Change repository archive order to export/import repository stores before the actual repository. This is done due to import stores before importing the actual repository and firing hooks that may trigger unnecessary computations otherwise.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-02-15 15:43:26 +01:00
Sebastian Sdorra
1a2dabeb66 Do not resolve external groups for system accounts (#1541)
This change modifies the behaviour of the DefaultGroupCollector.
The collector does not longer resolve external groups for the anonymous user and it does not resolve internal nor external groups for the account which is used by the AdministrationContext.
This should reduce the requests which are send to external systems like ldap servers.
2021-02-15 08:45:47 +01:00
Eduard Heimbuch
996a3b6f16 Fix NPE 2021-02-12 08:23:09 +01:00
René Pfeuffer
a0f50f5199 Fix changelog for #1458 2021-02-10 10:46:27 +01:00
Eduard Heimbuch
dc06bb799d Change output location for cypress e2e tests to build directory 2021-02-10 09:59:21 +01:00
René Pfeuffer
e0d2630a08 Feature repository specific data migration (#1526)
This adds a new migration mechanism for repository data. Instead of using UpdateSteps for all data migrations, repository data shall from now on be implemented with RepositoryUpdateSteps. The general logic stays the same. Executed updates are stored with the repository. Doing this, we can now execute updates on imported repositories without touching other data. This way we can import repositories even though they were exported with older versions of SCM-Manager or a plugin.
2021-02-10 08:12:48 +01:00
Sebastian Sdorra
7c50fd935c Fix broken mercurial http post args configuration (#1532)
Fixes a regression which was introduced with #1416. In #1416 we have reimplemented the way configuration is passed to the mercurial cgi handler. Before #1416 we used environment variables which are picked up by hgweb.py, after #1416 we pass mercurial configurations as command line parameters directly in the HgCGIServlet. But sadly the configuration option for httppostargs uses still an environment variable, which is not picked up by anyone.

See #1525
2021-02-09 15:59:05 +01:00
René Pfeuffer
e6f237e10a Fix changelog type 2021-02-09 08:45:38 +01:00
René Pfeuffer
b82496d5b1 Add error message for password error (#1527)
Adds missing error message for wrong password in "change password" dialog.
2021-02-09 07:55:17 +01:00
Sebastian Sdorra
fbf75ba580 Fix conflict between property and task name 2021-02-08 13:21:28 +01:00
Sebastian Sdorra
b3caa607cf Reduce time spend in configuration phase (#1528)
Do not add scm-packaging modules to every build.
These modules drastically increase the time Gradle spends in the configuration phase.
To build a distribution of SCM-Manager pass -Pdistribution.
Upgrade Gradle to 6.8.2.
2021-02-08 10:48:21 +01:00
René Pfeuffer
c0fbeeb7a4 Fix changelog file name 2021-02-05 15:44:36 +01:00
René Pfeuffer
5c94031c66 Fix never failing test 2021-02-05 13:59:33 +01:00
Eduard Heimbuch
877713574a Merge imported repository permissions with existing repository permissions (#1520) 2021-02-05 12:20:55 +01:00
Eduard Heimbuch
ac5d145266 Repository export read-only lock (#1519)
* Lock repository for read-only access only while exporting
* Create read-only check api

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-02-04 15:29:49 +01:00
René Pfeuffer
04c6243f64 Fix interrupt handling 2021-02-04 09:23:32 +01:00