Add www-data/nobody to owner dropdown via _USER_WHITELIST

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
marcandClaude Sonnet 4.6 committed 2026-06-20 17:31:01 +02:00
1 parent b6179865b5
commit 06013a1e59
1 file changed
+3 -1
+3 -1
View File
@@ -760,6 +760,7 @@ def set_permissions():
# ===== GROUPS ===== # ===== GROUPS =====
_GROUP_WHITELIST = {'root', 'staff', 'sambashare', 'www-data'} _GROUP_WHITELIST = {'root', 'staff', 'sambashare', 'www-data'}
_USER_WHITELIST = {'www-data', 'nobody'} # system accounts useful as folder owners
def _list_groups(): def _list_groups():
@@ -855,7 +856,8 @@ def _list_users():
name, uid = parts[0], parts[2] name, uid = parts[0], parts[2]
uid = int(uid) uid = int(uid)
if uid < 1000 or uid == 65534: if uid < 1000 or uid == 65534:
continue if name not in _USER_WHITELIST:
continue
users.append({'name': name, 'uid': uid, 'smb': name in smb}) users.append({'name': name, 'uid': uid, 'smb': name in smb})
return users return users