mirror of
https://github.com/9001/copyparty.git
synced 2026-08-13 13:53:06 -06:00
shares: dont suggest write for fileshares;
the ui would still show the option to grant write-permission when creating a fileshare; pointless since an existing file can't be overwritten without the delete-permission while this is obvious and nobody would intentionally create a fileshare with write, avoid any confusion by hiding it
This commit is contained in:
parent
4543ab31d3
commit
b2e4b1c46c
|
|
@ -4058,6 +4058,11 @@ var fileman = (function () {
|
|||
}
|
||||
shui.style.display = 'block';
|
||||
|
||||
var wr = has(perms, 'write') && !fns.length;
|
||||
var nope = ['admin', 'move', 'delete', 'upget'];
|
||||
if (!wr)
|
||||
nope.push('write');
|
||||
|
||||
var html = [
|
||||
'<div>',
|
||||
'<table>',
|
||||
|
|
@ -4078,10 +4083,10 @@ var fileman = (function () {
|
|||
'<tr><td>perms</td><td class="sh_axs">',
|
||||
];
|
||||
for (var a = 0; a < perms.length; a++)
|
||||
if (!has(['admin', 'move', 'delete', 'upget'], perms[a]))
|
||||
if (!has(nope, perms[a]))
|
||||
html.push('<a href="#" class="tgl btn">' + perms[a] + '</a>');
|
||||
|
||||
if (has(perms, 'write'))
|
||||
if (wr)
|
||||
html.push('<a href="#" class="btn">write-only</a>');
|
||||
|
||||
html.push('</td></tr></div');
|
||||
|
|
|
|||
Loading…
Reference in a new issue