mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Change only the current app label
Co-authored-by: Kayou <pierre@kayou.io>
This commit is contained in:
parent
257b2e7890
commit
d40731aa76
1 changed files with 3 additions and 0 deletions
|
@ -732,6 +732,8 @@
|
||||||
app.post('#/apps/:app/changelabel', function (c) {
|
app.post('#/apps/:app/changelabel', function (c) {
|
||||||
c.api('GET', '/users/permissions?short', {}, function(data_permissions) {
|
c.api('GET', '/users/permissions?short', {}, function(data_permissions) {
|
||||||
for (perm of data_permissions.permissions) {
|
for (perm of data_permissions.permissions) {
|
||||||
|
if (perm.split('.')[0] == c.params['app'])
|
||||||
|
{
|
||||||
if ('show_tile_' + perm in c.params) {
|
if ('show_tile_' + perm in c.params) {
|
||||||
show_tile = "True";
|
show_tile = "True";
|
||||||
} else {
|
} else {
|
||||||
|
@ -740,6 +742,7 @@
|
||||||
new_label = c.params["label_" + perm]
|
new_label = c.params["label_" + perm]
|
||||||
c.api('PUT', '/users/permissions/' + perm, {show_tile: show_tile, label: new_label}, function(data) {});
|
c.api('PUT', '/users/permissions/' + perm, {show_tile: show_tile, label: new_label}, function(data) {});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
c.redirect_to('#/apps/'+ c.params['app']);
|
c.redirect_to('#/apps/'+ c.params['app']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue