Commit Graph

4071 Commits

Author SHA1 Message Date
Konstantin Schaper
1b18191c57 Add plugin wizard initialization step (#2045)
Adds a new initialization step after setting up the initial administration account that allows administrators to initialize the instance with a selection of plugin sets.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2022-05-31 15:15:30 +02:00
Florian Scholdei
6216945f0d Notify user about results of manually executed health check (#2044)
When manually starting health checks, the user should always receive a notification about the status, whether successful or not.
2022-05-25 09:30:45 +02:00
Eduard Heimbuch
8f0facf394 Order repo info extensions (#2041)
Set order priority for repository information extensions.
Also add new annotation to set custom resource bundles for cli commands.
2022-05-23 15:06:08 +02:00
Eduard Heimbuch
b2751dc6a7 Add missing description key for repository get command 2022-05-20 11:09:00 +02:00
Matthias Thieroff
8981a98064 Fix language specific CLI problems (#2042)
Unit tests which deal with translated text need to be specific about
the language the test should use. Otherwise system default gets used
which may lead to problems. Also line endings may be a problem on
different OS.
This fixes two of the above issues.
2022-05-20 10:58:21 +02:00
René Pfeuffer
303f8daaf9 Fix NPE on synchronous repository export (#2040)
When a repository was exported synchronously with metadata,
the server ran into a NullPointerException. The was because
the resource tried to write an export result to a stored
export item, that does not exist for synchronous exports.

This simply removes this call.
2022-05-19 08:36:25 +02:00
Florian Scholdei
8448a3520b Correct resource for branch details (#2037)
The two BranchDetails resource endpoints were shown twice in the Rest Api documentation. Once each without path prefix.
This pr removes the duplicate endpoints.
2022-05-17 16:34:25 +02:00
Eduard Heimbuch
1c540e1fbd Sort CLI commands alphabetically (#2020)
Sort CLI commands alphabetically to show them in consistent order.
2022-05-04 09:36:01 +02:00
Eduard Heimbuch
77046bb6fd Throw error if repo is created with not supported type (#2019)
Throw error if repository is created with not supported type. Currently we only allow git, svn or hg all lowercase.
2022-05-03 16:06:38 +02:00
René Pfeuffer
c05ddf7376 Fix log in cli exception handler 2022-05-03 14:34:28 +02:00
René Pfeuffer
9e8ac9a05f Log exceptions in cli execution 2022-05-03 13:36:46 +02:00
René Pfeuffer
b8e2ae747a Omit default port in protocol urls (#2014)
This omits the port in the protocol urls when the port is the default port for the protocol.
So if you have your server https://my.scm.net/scm and the repository admin/test, the protocol url is no longer https://my.scm.net:443/scm/repo/admin/test, but simply https://my.scm.net/scm/repo/admin/test without the :443.
2022-04-29 11:57:28 +02:00
René Pfeuffer
84f7c5c099 Update jjwt to 0.11.5 (#2017)
Updates jjwt in response to CVE-2022-21449.

See https://github.com/jwtk/jjwt/blob/0.11.5/CHANGELOG.md?s=03#0115
2022-04-29 11:17:47 +02:00
Eduard Heimbuch
ca9b20940f Translate cli parameter exceptions (#1997)
Translate CLI parameter exceptions to german. We explictly do not translate the default english exceptions to custom ones since the default messages are more specific/helpful.
2022-04-13 08:47:32 +02:00
René Pfeuffer
d2e81ce121 Add cli commands for users and groups (#1993)
Adds cli commands to manage users and groups.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2022-04-11 10:04:19 +02:00
René Pfeuffer
e926711157 Use i18n for cli exception (#1989)
For scm exceptions, use the translations from plugins.json in the cli rest endpoint.
2022-04-06 14:30:30 +02:00
Eduard Heimbuch
02b3c5c810 Fix version command test 2022-04-06 13:07:41 +02:00
René Pfeuffer
dd3b616ba4 Limit scopes and rename bean (#1991)
This limits the scope of all cli related classes, so that
they cannot be used outside of cli context and therefore
cannot confuse other developers.

Secondly, we rename RepositoryCommandDto to
RepositoryCommandBean, because we have no data transfers
here and the name might be confusing otherwise.
2022-04-06 09:16:03 +02:00
Eduard Heimbuch
4823ed59a2 Add version command for cli client (#1988)
Implement version command to show client and server versions on command line client.
2022-04-05 08:20:18 +02:00
Eduard Heimbuch
162dd6ad0a CLI Support for repository actions (#1987)
To make SCM-Manager more accessible and to make it easier using scripts against the server, we created a command line interface. This command line interface can be used to perform the default actions like create, modify and delete repositories. It is also very flexible and can be extended by plugins.

The CLI already supports internationalization, help texts, input validation, loose and table-like templates and nested subcommands. Check the cli guidelines to learn how add new cli commands.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2022-04-04 12:02:16 +02:00
René Pfeuffer
de9984ae2c Do not process missing index types (#1985)
Fixes an error that arises, when a plugin with search
indices for repositories is removed and later on a repository
is deleted. This led to a null pointer exception in the
SearchableTypeResolver, but only because an "illegal" index
detail without proper type was given as a parameter. This
type cannot be resolved any longer due to the removed plugin.
We therefore can simply filter these index details.
2022-03-30 15:30:54 +02:00
René Pfeuffer
4bba593714 Remove plugin center login without url (#1978)
This removes the "login" button for the plugin center, when the authentication url is not set.
2022-03-21 08:21:36 +01:00
Eduard Heimbuch
b7f44315b2 Not unique revisions on compare (#1974)
* Throw more specific exception if compared revisions are ambiguous.
* Add changelog entry
* Move changelog entry in intended folder
* Small typo

Co-authored-by: Florian Scholdei <florian.scholdei@cloudogu.com>
2022-03-14 10:34:17 +01:00
Eduard Heimbuch
4407dc6d8a Add feedback form (#1967)
Add feedback button and form. This feedback form can be used to provide direct feedback to the SCM-Manager Team.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2022-03-10 09:39:17 +01:00
René Pfeuffer
f125f75dc6 Enhance contributor API (#1966)
This adds a core API to handle contributors in changesets for plugins.
2022-02-28 15:03:00 +01:00
René Pfeuffer
ecb14eb380 Fix branch overview page (#1963) 2022-02-24 08:59:06 +01:00
René Pfeuffer
2490bf07d5 Fix ClassNotFoundException on startup (#1958) 2022-02-21 13:51:04 +01:00
Eduard Heimbuch
a50e38077c Fix npe for searchable types which no longer exist because the plugin that provided the type was deleted 2022-02-18 08:19:51 +01:00
Eduard Heimbuch
9fa0396167 Fix missing css for migration wizard 2022-02-17 10:25:14 +01:00
René Pfeuffer
2ededac869 Update RestEasy (#1953)
Updates RestEasy to version 4.7.5.Final.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-02-15 14:51:09 +01:00
Matthias Thieroff
44f0046f25 Collapse folders with only one child folder (#1951)
Collapses a folder in code view which only has another folder as its only child. This lets you access a sub-folder which has content directly instead of navigating down the folder tree by clicking every folder separately.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2022-02-15 10:59:32 +01:00
Sebastian Sdorra
466334aaa7 Update vulnerable version of cron-utils (#1942)
* Update lock files

* Replace usage of org.apache.commons.lang3 with guava

* Update vulnerable version of cron-utils

Update cron-util from version 9.1.3 to 9.1.6.
Version 9.1.6 fixes an arbitrary code execution
vulnerability (CVE-2021-41269).
SCM-Manager is not affected by this issue,
because it is related to the el parsing
of an annotation which we don't use.
2022-02-01 18:06:53 +01:00
Sebastian Sdorra
44be389d0c Enable Gradle dependency locking (#1922)
Enable gradle dependency locking for all subprojects. This change allows us to use dependency ranges, without loosing reproducible builds.
It also makes it easier for third party services such as snyk to detect dependencies and their versions.
2022-02-01 15:14:18 +01:00
Sebastian Sdorra
c74e9984f6 Handle Plugin Center Authentication failures (#1940)
If the plugin center authentication fails,
the plugins are fetched without authentication
and a warning is displayed on the plugin page.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2022-01-31 15:41:12 +01:00
Matthias Thieroff
0f01bb82c6 Fix bugs in unit tests which occur on Windows only (#1927)
On Windows it is much more necessary to close files to avoid locked files which prevent deleting a temporary file or folder. Also paths need to be handled differently because of the drive letter and colon appearing on Windows.
2022-01-20 08:48:13 +01:00
Eduard Heimbuch
63ec4e6172 Add security notifications to inform about vulnerabilities (#1924)
Add security notifications in SCM-Manager to inform running instances about known security issues. These alerts can be core or plugin specific and will be shown to every user in the header.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
Co-authored-by: Philipp Ahrendt <philipp.ahrendt@cloudogu.com>
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2022-01-19 11:58:55 +01:00
Eduard Heimbuch
07fa753f80 Encrypt myCloudogu refresh token on file system (#1923)
Encrypt myCloudogu refresh token on file system and update current stored tokens using an update step.
2022-01-19 09:26:01 +01:00
René Pfeuffer
f2a1effc77 Sorted autocomplete (#1918)
Users, groups, repositories and repository roles have been sorted in the rest layer by default if no other sort option was given. In the layers "below" (aka the manager classes or the dao), the collections have been unsorted. This led to the effect, that the autocomplete resource, which did not sort all values beforehand, returned unsorted results. As a sideeffect, direct matches for an input could occur at a random position or not at all (as reported in #1695), when there were enough other matches.

With this pull request the databases for users, groups, repositories and repository roles will use instances of TreeMap instead of LinkedHashMap internally, so that these values are sorted implicitly (by id respectively name for users, groups and repository roles and namespace/name for repositories).

Due to this change the default sort applied in the rest layer could be removed.
2022-01-18 09:46:10 +01:00
René Pfeuffer
6ca88e6772 Merge branch 'master' into develop 2022-01-18 08:22:37 +01:00
Sebastian Sdorra
3f1b519f97 Fix path traversal vulnerability 2022-01-17 16:01:09 +01:00
René Pfeuffer
32cf1f0044 Fix unit tests for #1916
Fixup for commit e9f22e89ec
2022-01-11 17:37:26 +01:00
René Pfeuffer
e9f22e89ec Autocomplete for namespaces (#1916)
Changes the "namespace" input in the repository creation form or the "rename repository" dialog to an
autocomplete input. Of course this is only available for the "custom" namespace strategy.
2022-01-11 16:17:57 +01:00
Matthias Thieroff
bc86ed4474 Display search result fixes (#1901)
Fix syntax highlighting on non highlighted fields. Fix ellipsis on new lines in code syntax highlighting. Fix ellipsis on content start or end in non code fields.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-12-21 15:10:08 +01:00
Matthias Thieroff
11673e6d07 Fix display of ellipsis in search fragments (#1896)
Display ellipsis as an indicator that there is more content before or behind a search result fragment only if there really is more content.
2021-12-15 15:07:46 +01:00
René Pfeuffer
1118ddd146 Ahead/behind in branch details (#1893)
Adds the ahead/behind count to the branch details view.
2021-12-15 15:03:40 +01:00
Sebastian Sdorra
e2d63cc2a1 Use more accurate language detection for syntax highlighting (#1891)
Updated spotter to version 4 in order to get prism syntax mode for detected coding languages.
Expose syntax modes of coding languages as headers on content endpoint and as fields on diff dto.
Remove leading line break on search result fragments.
Use mark instead of span or strong for highlighted search results.
Add option to use syntax highlighting in TextHitField component.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2021-12-13 17:03:08 +01:00
Sebastian Sdorra
6eba01161f Integrate Plugin Center myCloudogu Authentication (#1884)
Allows scm-manager instances to authenticate with the configured plugin center. If the default plugin center is used, a myCloudogu account is used for authentication which in turn enables downloading special myCloudogu plugins directly through the plugin administration page.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: Matthias Thieroff <93515444+mthieroff@users.noreply.github.com>
Co-authored-by: Philipp Ahrendt <philipp.ahrendt@cloudogu.com>
2021-12-13 15:15:57 +01:00
Eduard Heimbuch
b8d6c219ee Add extension point to branches overview (#1888)
Prepare branches overview to show additional branch details.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-12-10 11:04:59 +01:00
René Pfeuffer
b2d7ed88e4 Explain provision exception (#1890)
When the ResourceLinks class could not access the
scmPathInfoStore due to an invalid request scope
(that is outside http requests), this might
lead to confusion due to messages from guice. We
try to "fix" these by using an own explanation to
what probably went wrong and how to mitigate this.
2021-12-09 15:48:42 +01:00
René Pfeuffer
65d1e4ffd2 Fix access to ScmPathInfoStore as Provider to prevent injection errors (#1889)
Fix access to ScmPathInfoStore as Provider to prevent injection errors. Errors might happen, if beans using ScmPathInfoStore (like the BranchLinkProvider) are injected in beans that are singletons or that have be created outside of request scope otherwise. We do so knowing that this might lead to runtime errors (eg. when links shall be build in a thread that has no request scope). We have decided nonetheless that injection errors on startup are worse for plugin developers, that may have no clue how to solve injection problems.
2021-12-09 07:05:12 +01:00