Compare commits

...

7 Commits

Author SHA1 Message Date
Simon Vieille aa139bc671 Merge pull request 'release v3.7.3' (#246) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/246
2023-04-14 21:13:10 +02:00
Simon Vieille b9264d7e05 release v3.7.3 2023-04-14 21:12:35 +02:00
Simon Vieille 88c14b6aec Merge pull request 'use app href for redirection' (#245) from fix/issue244 into develop
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/245
2023-04-14 21:11:29 +02:00
Simon Vieille 2be53211b8 Merge pull request 'add signature generation' (#243) from feature/issue240 into develop
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/243
2023-04-14 21:00:37 +02:00
Simon Vieille dca727c120 use app href for redirection (fix #244) 2023-04-14 20:58:56 +02:00
Simon Vieille 361badff6b update changelog 2023-03-31 17:06:30 +02:00
Simon Vieille 917288eb54 add signature generation
rename steps
2023-03-31 14:07:19 +02:00
4 changed files with 46 additions and 19 deletions
+23 -6
View File
@@ -8,13 +8,13 @@ pipeline:
event: [tag, push, pull_request] event: [tag, push, pull_request]
branch: [master, develop, feature/*, fix/*, translations] branch: [master, develop, feature/*, fix/*, translations]
osv_detector: osv-detector:
image: gitnet.fr/deblan/osv-detector:v0.10 image: gitnet.fr/deblan/osv-detector:v0.10
commands: commands:
- osv-detector package-lock.json - osv-detector package-lock.json
failure: ignore failure: ignore
build_js: build-js:
image: node:16 image: node:16
commands: commands:
- npm run build - npm run build
@@ -22,7 +22,7 @@ pipeline:
branch: [master, develop, feature/*, fix/*, translations] branch: [master, develop, feature/*, fix/*, translations]
event: [tag, push, pull_request] event: [tag, push, pull_request]
build_php: build-translations:
image: deblan/php:8.0 image: deblan/php:8.0
commands: commands:
- php bin/generate_l10n.php - php bin/generate_l10n.php
@@ -30,7 +30,24 @@ pipeline:
branch: [master, develop, feature/*, fix/*, translations] branch: [master, develop, feature/*, fix/*, translations]
event: [tag, push, pull_request] event: [tag, push, pull_request]
code_quality: create-signature:
image: nextcloud:25
secrets: [app_certificate, app_public_certificate]
environment:
SQLITE_DATABASE: /var/www/data/data.db
NEXTCLOUD_ADMIN_USER: admin
NEXTCLOUD_ADMIN_PASSWORD: admin
commands:
- echo "$APP_CERTIFICATE" > "/tmp/side_menu.key"
- echo "$APP_PUBLIC_CERTIFICATE" > "/tmp/side_menu.crt"
- /usr/src/nextcloud/occ integrity:sign-app
--privateKey=/tmp/side_menu.key
--certificate=/tmp/side_menu.crt
--path=$CI_WORKSPACE
when:
event: [tag]
check-code-quality:
image: sonarsource/sonar-scanner-cli image: sonarsource/sonar-scanner-cli
secrets: [sonar_token, sonar_host, sonar_project] secrets: [sonar_token, sonar_host, sonar_project]
commands: commands:
@@ -45,7 +62,7 @@ pipeline:
when: when:
event: [pull_request] event: [pull_request]
package: create-package:
image: deblan/php:8.0 image: deblan/php:8.0
volumes: volumes:
- /var/www/html/artifacts:/var/www/html/artifacts - /var/www/html/artifacts:/var/www/html/artifacts
@@ -61,7 +78,7 @@ pipeline:
when: when:
event: [tag] event: [tag]
release: push-release:
image: plugins/gitea-release image: plugins/gitea-release
volumes: volumes:
- /var/www/html/artifacts:/var/www/html/artifacts - /var/www/html/artifacts:/var/www/html/artifacts
+6
View File
@@ -1,5 +1,11 @@
## [Unreleased] ## [Unreleased]
## 3.7.3
### Fixed
* fix #244: use app href for redirection
### Added
* add signature on build
## 3.7.2 ## 3.7.2
### Added ### Added
* update pipeline conditions allowing `fix/*` * update pipeline conditions allowing `fix/*`
+1 -1
View File
@@ -32,7 +32,7 @@ Notice
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**. Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/). In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
]]></description> ]]></description>
<version>3.7.2</version> <version>3.7.3</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author> <author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
<namespace>SideMenu</namespace> <namespace>SideMenu</namespace>
+7 -3
View File
@@ -78,14 +78,15 @@ class AppController extends Controller
continue; continue;
} }
return $this->redirectToApp($app['id']); return $this->redirectToApp($app, true);
} }
return $this->redirectToApp('files'); return $this->redirectToApp('files');
} }
protected function redirectToApp($appId): RedirectResponse protected function redirectToApp($app, bool $isHref = false): RedirectResponse
{ {
if (!$isHref) {
$isIgnoreFrontController = true === OC::$server->getConfig()->getSystemValue( $isIgnoreFrontController = true === OC::$server->getConfig()->getSystemValue(
'htaccess.IgnoreFrontController', 'htaccess.IgnoreFrontController',
false false
@@ -99,7 +100,10 @@ class AppController extends Controller
$path = '/index.php/apps/%s/'; $path = '/index.php/apps/%s/';
} }
$url = $this->urlGenerator->getAbsoluteURL(sprintf($path, $appId)); $url = $this->urlGenerator->getAbsoluteURL(sprintf($path, $app));
} else {
$url = $app['href'];
}
return new RedirectResponse($url); return new RedirectResponse($url);
} }