1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

update to upstream

This commit is contained in:
ericgaspar 2020-07-14 12:56:01 +02:00
parent 0e87e6cfce
commit 3dbd2e68a7
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 21 additions and 56 deletions

View file

@ -1,4 +1,4 @@
# Garradin
# Garradin for YunoHost
[![Integration level](https://dash.yunohost.org/integration/garradin.svg)](https://dash.yunohost.org/appci/app/garradin) ![](https://ci-apps.yunohost.org/ci/badges/garradin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/garradin.maintain.svg)
[![Install Garradin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=garradin)
@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview
Garradin is a free association managing software.
**Shipped version:** 0.9.6
**Shipped version:** 0.9.7
## Screenshots
@ -45,9 +45,6 @@ LDAP is not supported yet.
* The application is ONLY translated into french.
**More info on the documentation page:**
https://yunohost.org/packaging_apps
## Links
* Report a bug: https://github.com/YunoHost-Apps/garradin_ynh/issues
@ -60,7 +57,6 @@ https://yunohost.org/packaging_apps
Developer info
----------------
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/garradin_ynh/tree/testing).
To try the testing branch, please proceed like that.

View file

@ -1,17 +1,17 @@
# Garradin
# Garradin pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/garradin.svg)](https://dash.yunohost.org/appci/app/garradin) ![](https://ci-apps.yunohost.org/ci/badges/garradin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/garradin.maintain.svg)
[![Installer Garradin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=garradin)
*[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer REPLACEBYYOURAPP rapidement et simplement sur un serveur YunoHost.
> *Ce package vous permet d'installer Garradin rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
## Vue d'ensemble
Garradin est un logiciel libre de gestion associative. il permet de gérer des membres.
**Version incluse :** 0.9.6
**Version incluse :** 0.9.7
## Captures d'écran
@ -44,9 +44,6 @@ Garradin est un logiciel libre de gestion associative. il permet de gérer des m
* Garradin n'est disponible qu'en français.
**Plus d'informations sur la page de documentation :**
https://yunohost.org/packaging_apps
## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/garradin_ynh/issues
@ -59,7 +56,6 @@ https://yunohost.org/packaging_apps
Informations pour les développeurs
----------------
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/garradin_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-0.9.6.tar.bz2
SOURCE_SUM=a0c4dcc6adc25a6f093bc09b0ed4c7efcbfde0726b790431c293112800ccc282
SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-0.9.7.tar.bz2
SOURCE_SUM=659b1e2fada284f76d6a37f592c6e7068eb883bb8361392de207aff79ad53af7
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,5 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__ {
location __PATH__/ {
# Path to source
alias __FINALPATH__/www/ ;

View file

@ -2,21 +2,19 @@
"name": "Garradin",
"id": "garradin",
"packaging_format": 1,
"requirements": {
"yunohost": ">=3.7.0"
},
"description": {
"en": "Software to manage association",
"fr": "Logiciel libre de gestion d'association"
},
"version": "0.9.6~ynh3",
"version": "0.9.7~ynh1",
"url": "http://garradin.eu/a-propos/",
"license": "GPL-3.0-or-later",
"maintainer": {
"name": "frju365",
"email": "win10@tutanota.com"
},
"requirements": {
"yunohost": ">=3.7.1"
},
"multi_instance": true,
"services": [

View file

@ -8,39 +8,14 @@
pkg_dependencies="php-sqlite3"
# ============= FUTURE YUNOHOST HELPER =============
#=================================================
# PERSONAL HELPERS
#=================================================
# Check if a permission exists
#
# While waiting for this new helper https://github.com/YunoHost/yunohost/pull/905
# We have to use another one because the new helper use a new YunoHost command, not available for now.
#
# usage: ynh_permission_has_user --permission=permission --user=user
# | arg: -p, --permission - the permission to check
# | arg: -u, --user - the user seek in the permission
#
# example: ynh_permission_has_user --permission=main --user=visitors
#
# Requires YunoHost version 3.7.1 or higher.
ynh_permission_has_user() {
local legacy_args=pu
# Declare an array to define the options of this helper.
declare -Ar args_array=( [p]=permission= [u]=user= )
local permission
local user
# Manage arguments with getopts
ynh_handle_getopts_args "$@"
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
if ! ynh_permission_exists --permission=$permission
then
return 1
fi
# List all permissions
# Filter only the required permission with a multiline sed (Here a cut from the permission to the next one), remove the url and his value
perm="$(yunohost user permission list --full --output-as plain | sed --quiet "/^#$app.$permission/,/^#[[:alnum:]]/p" | sed "/^##url/,+1d")"
# Remove all lines starting by # (got from the plain output before)
allowed_users="$(echo "$perm" | grep --invert-match '^#')"
# Grep the list of users an return the result if the user is indeed into the list
echo "$allowed_users" | grep --quiet --word "$user"
}
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================