From 587e902c127bc759ec18cb01783bc5a9611cdd06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 30 Mar 2020 17:41:25 +0200 Subject: [PATCH] Let's give the possiblity to the user to modify the tile and to show or drop the tile in the SSO --- data/actionsmap/yunohost.yml | 9 +++++++++ src/yunohost/user.py | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index 3a4c9db97..892fda8d4 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -318,6 +318,15 @@ user: metavar: GROUP_OR_USER extra: pattern: *pattern_username + -l: + full: --label + help: Label for this permission. This label will be shown on the SSO and in the admin + -s: + full: --show_tile + help: Define if a tile will be shown in the SSO + choices: + - 'True' + - 'False' ## user_permission_reset() reset: diff --git a/src/yunohost/user.py b/src/yunohost/user.py index fdcac658d..eee18aafb 100644 --- a/src/yunohost/user.py +++ b/src/yunohost/user.py @@ -775,10 +775,11 @@ def user_permission_list(short=False, full=False): return yunohost.permission.user_permission_list(short, full) -def user_permission_update(permission, add=None, remove=None, sync_perm=True): +def user_permission_update(permission, add=None, remove=None, label=None, show_tile=None, sync_perm=True): import yunohost.permission return yunohost.permission.user_permission_update(permission, add=add, remove=remove, + label=label, show_tile=show_tile, sync_perm=sync_perm)