Request create-only Nextcloud share without public-upload permission override
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a06ecb-456a-71c2-b41e-0755d336e883
This commit is contained in:
codex 2026-09-05 20:40:26 +02:00
parent 708ba5d174
commit feee30988b

View file

@ -105,10 +105,13 @@ def run(args, receipt):
if matches:
share = matches[0]
else:
share = ocs(auth, method='POST', fields={'path':FOLDER,'shareType':3,'permissions':4,'publicUpload':'true','label':LABEL,'sendMail':'false'})
share = ocs(auth, method='POST', fields={'path':FOLDER,'shareType':3,'permissions':4,'label':LABEL,'sendMail':'false'})
created = True
share_id = str(share['id'])
receipt['share_id'] = share_id
receipt['observed_permissions'] = int(share['permissions'])
receipt['owner_matches'] = share.get('uid_owner') == 'Backup'
receipt['path_matches'] = share.get('path') == FOLDER
if share.get('uid_owner') != 'Backup' or share.get('path') != FOLDER or int(share['permissions']) != 4:
if created:
ocs(auth, '/' + share_id, 'DELETE')