summaryrefslogtreecommitdiffstats
path: root/modules-available/sysconfig/templates
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-10 14:01:18 +0100
committerSimon Rettberg2020-12-10 14:01:18 +0100
commitcdf414bf6a999788d4d70e997f8c413e96ef7bb1 (patch)
tree3c05b78ffd5133fafaf110b4dd392294399d788e /modules-available/sysconfig/templates
parent[rebootcontrol] rename scheduler table and associated queries (diff)
downloadslx-admin-cdf414bf6a999788d4d70e997f8c413e96ef7bb1.tar.gz
slx-admin-cdf414bf6a999788d4d70e997f8c413e96ef7bb1.tar.xz
slx-admin-cdf414bf6a999788d4d70e997f8c413e96ef7bb1.zip
[sysconfig] CustomModule: Add check for file ownership, add "fix" option
The fix option will change the owner/group of every file and directory in the archive to root:root Previously, the client changed the ownership of the config.tgz contents to root when extracting, but in some cases it's desired to deliver files with specific owner and group settings. The version of the CustomModule module has been bumped to 2, so we can automatically convert old modules when upgrading or importing a backup, to be compatible to the old "root everything on the client" logic.
Diffstat (limited to 'modules-available/sysconfig/templates')
-rw-r--r--modules-available/sysconfig/templates/custom-filelist.html18
-rw-r--r--modules-available/sysconfig/templates/custom-fileselect.html35
2 files changed, 44 insertions, 9 deletions
diff --git a/modules-available/sysconfig/templates/custom-filelist.html b/modules-available/sysconfig/templates/custom-filelist.html
index 344eece3..20cedfda 100644
--- a/modules-available/sysconfig/templates/custom-filelist.html
+++ b/modules-available/sysconfig/templates/custom-filelist.html
@@ -4,11 +4,23 @@
{{#files}}
<tr>
{{#isdir}}
- <td class="fileEntry slx-bold" colspan="2">{{name}}</td>
+ <td class="fileEntry slx-bold" colspan="4">{{name}}</td>
{{/isdir}}
{{^isdir}}
- <td class="fileEntry">{{name}}</td>
- <td>{{size}}</td>
+ <td class="fileEntry">
+ {{name}}
+ {{#linkTarget}}
+ -&gt;
+ <span class="text-nowrap">{{linkTarget}}</span>
+ {{/linkTarget}}
+ </td>
+ <td class="text-nowrap">{{user}}{{#user}}{{#group}}/{{/group}}{{/user}}{{group}}</td>
+ <td class="text-nowrap">{{userId}}:{{groupId}}</td>
+ <td class="text-nowrap">
+ {{^linkTarget}}
+ {{size}}
+ {{/linkTarget}}
+ </td>
{{/isdir}}
</tr>
{{/files}}
diff --git a/modules-available/sysconfig/templates/custom-fileselect.html b/modules-available/sysconfig/templates/custom-fileselect.html
index f14a6fde..3e7dd3d6 100644
--- a/modules-available/sysconfig/templates/custom-fileselect.html
+++ b/modules-available/sysconfig/templates/custom-fileselect.html
@@ -4,7 +4,8 @@
<input type="hidden" name="edit" value="{{edit}}">
<div class="input-group">
<span class="input-group-addon">{{lang_moduleName}}</span>
- <input type="text" name="title" value="{{title}}" class="form-control" placeholder="Mein Konfigurationsmodul" autofocus="autofocus">
+ <input type="text" name="title" value="{{title}}" class="form-control" placeholder="Mein Konfigurationsmodul"
+ autofocus="autofocus">
</div>
<div class="pull-right">
<button type="submit" class="btn btn-primary">{{lang_next}} &raquo;</button>
@@ -12,18 +13,40 @@
<div class="clearfix"></div>
<hr>
<p>{{lang_checkFileContent}}</p>
+ {{#userGroupWarn}}
+ <div class="alert alert-warning">
+ {{lang_moduleOwnerWarn}}
+ </div>
+ <div class="checkbox">
+ <input id="force-owner" type="checkbox" name="force-owner" value="1" checked>
+ <label for="force-owner">{{lang_forceRootOwner}}</label>
+ </div>
+ <div class="slx-space"></div>
+ {{/userGroupWarn}}
<table class="table table-bordered table-condensed">
- {{#files}}
+ {{#files}}
<tr>
{{#isdir}}
- <td class="fileEntry slx-bold" colspan="2">{{name}}</td>
+ <td class="fileEntry slx-bold" colspan="4">{{name}}</td>
{{/isdir}}
{{^isdir}}
- <td class="fileEntry">{{name}}</td>
- <td>{{size}}</td>
+ <td class="fileEntry">
+ {{name}}
+ {{#linkTarget}}
+ -&gt;
+ <span class="text-nowrap">{{linkTarget}}</span>
+ {{/linkTarget}}
+ </td>
+ <td class="text-nowrap">{{user}}{{#user}}{{#group}}/{{/group}}{{/user}}{{group}}</td>
+ <td class="text-nowrap">{{userId}}:{{groupId}}</td>
+ <td class="text-nowrap">
+ {{^linkTarget}}
+ {{size}}
+ {{/linkTarget}}
+ </td>
{{/isdir}}
</tr>
- {{/files}}
+ {{/files}}
</table>
<div class="pull-right">
<button type="submit" class="btn btn-primary">{{lang_next}} &raquo;</button>