Request create-only Nextcloud share without public-upload permission override
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a06ecb-456a-71c2-b41e-0755d336e883
This commit is contained in:
parent
708ba5d174
commit
feee30988b
1 changed files with 4 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue