Remove user rename feature; add www-data hint in WebDAV edit modal

- Removed PATCH /api/users/<name> route (rename_user)
- Removed renameModal from index.html
- Removed openRenameModal/submitRename from users.js
- Removed Rename button from users table
- Removed rename docs from README
- Added green info box in WebDAV edit modal: set group=www-data, mode=775

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
marcandClaude Sonnet 4.6 committed 2026-06-20 17:01:56 +02:00
1 parent f081496b4b
commit b6179865b5
5 files changed
+5 -70

No files matched your search

-26
View File
@@ -22,8 +22,6 @@ async function loadUsers() {
</span>
</td>
<td>
<button class="btn btn-sm me-1" style="border:1px solid var(--border); color:var(--muted)"
onclick="openRenameModal(${nameJson})">Rename</button>
<button class="btn btn-sm me-1" style="border:1px solid var(--border); color:var(--muted)"
onclick="openPwModal(${nameJson})">Password</button>
<button class="btn btn-sm btn-danger"
@@ -97,30 +95,6 @@ async function submitPassword() {
showToast(`Password updated for "${name}".`);
}
function openRenameModal(name) {
document.getElementById('renameOldName').value = name;
document.getElementById('renameNewName').value = name;
new bootstrap.Modal(document.getElementById('renameModal')).show();
}
async function submitRename() {
const oldName = document.getElementById('renameOldName').value;
const newName = document.getElementById('renameNewName').value.trim();
if (!newName) return showToast('New username is required.', 'danger');
const res = await apiFetch(`/api/users/${encodeURIComponent(oldName)}`, {
method: 'PATCH', headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: newName}),
});
if (!res) return;
const data = await res.json();
bootstrap.Modal.getInstance(document.getElementById('renameModal')).hide();
if (!res.ok) return showToast('Error: ' + (data.error || res.status), 'danger');
if (data.warning) showToast(data.warning, 'warning');
else showToast(`Renamed to "${newName}".`);
loadUsers();
loadGroups();
}
function openAdminSettings() {
document.getElementById('adminCurrentPw').value = '';