mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #417 from YunoHost/rename_app
[enh] new command 'app change-label'
This commit is contained in:
commit
ee65c7c461
2 changed files with 24 additions and 0 deletions
|
@ -647,6 +647,19 @@ app:
|
|||
authenticate: all
|
||||
authenticator: ldap-anonymous
|
||||
|
||||
### app_change_label()
|
||||
change-label:
|
||||
action_help: Change app label
|
||||
api: PUT /apps/<app>/label
|
||||
configuration:
|
||||
authenticate: all
|
||||
authenticator: ldap-anonymous
|
||||
arguments:
|
||||
app:
|
||||
help: App ID
|
||||
new_label:
|
||||
help: New app label
|
||||
|
||||
### app_addaccess() TODO: Write help
|
||||
addaccess:
|
||||
action_help: Grant access right to users (everyone by default)
|
||||
|
|
|
@ -1320,6 +1320,17 @@ def app_ssowatconf(auth):
|
|||
logger.success(m18n.n('ssowat_conf_generated'))
|
||||
|
||||
|
||||
def app_change_label(auth, app, new_label):
|
||||
installed = _is_installed(app)
|
||||
if not installed:
|
||||
raise MoulinetteError(errno.ENOPKG,
|
||||
m18n.n('app_not_installed', app=app))
|
||||
|
||||
app_setting(app, "label", value=new_label)
|
||||
|
||||
app_ssowatconf(auth)
|
||||
|
||||
|
||||
def _get_app_settings(app_id):
|
||||
"""
|
||||
Get settings of an installed app
|
||||
|
|
Loading…
Add table
Reference in a new issue