We recently found out (thanks to junior QA) that new list experience simply ignores security bit setting on list. I did some tests and I can confirm this on SharePoint Online. Below, you can find full details and repro steps with code.
Can anyone contact Microsoft or push this issue higher? It's rather large critical.
When using "New Lists Experience" user can recycle items, even without having rights to do so.
Create Custom List, break roles; add few users as a contributors (for example user A, and user B)
Go to list settings, advances settings, set "Item Level Permissions" (so called security bits) to:
Read All Items
Create items and edit items that were created by the user
Create few items as User A
Login as User B, go to default list view
Make sure you are using new list experience
select item from User A
Click delete (confirm).
Item have been deleted successfully.
New list experience is using REST API - sending a POST call to
/_api/web/GetFileByServerRelativePath(DecodedUrl=@a1)/recycle?@a1='/<relative_list_url>/<item_id>_.000', which is clearly a file-recycle method. As far as I remember, you cannot specify security bits on document libraries, so method author didn't bother with security check...
I have checked following methods (APIs) and both of them return forbidden error:
REST LIST API:
Code with examples:
(just make sure to run it on chrome because i have used fat arrow operator; remember change SharePoint Online URL as well)
Can anyone confirm this?