SenseNet / sensenet

Open Source Content Services Platform written in .NET
https://sensenet.com
GNU General Public License v2.0
173 stars 112 forks source link

Unable to delete content if the owner is Visitor #1952

Closed vn0804 closed 7 months ago

vn0804 commented 1 year ago

Details

I'm unable to delete a content if it's owner is Visitor, even if I'm logged in as builtin administrator. The action that I was using is DeleteBatch. It actually responds with 200 OK, but I get the following exception:

Stack trace

Inner Exception: SenseNetSecurityException: Access denied. at SenseNet.ContentRepository.Storage.Node.set_Owner(Node value) at SenseNet.ContentRepository.TrashBag.BagThis(GenericContent node) at SenseNet.ContentRepository.TrashBin.DeleteNode(GenericContent n) at SenseNet.ContentRepository.GenericContent.Delete(Boolean bypassTrash) at SenseNet.ApplicationModel.DeleteAction.Execute(Content content, Object[] parameters) in ...\src\Services\ApplicationModel\DeleteAction.cs:line 38 at SenseNet.Portal.OData.ODataFormatter.WriteOperationResult(Stream inputStream, PortalContext portalContext, ODataRequest odataReq) in ...\src\Services\OData\ODataFormatter.cs:line 470 at SenseNet.Portal.OData.ODataHandler.ProcessRequest(HttpContext context, String httpMethod, Stream inputStream) in ...\src\Services\OData\ODataHandler.cs:line 195

ODataException/SenseNetSecurityException/FormattedMessage - The Visitor user cannot be owner of a content. ODataException/SenseNetSecurityException/EventId - 40 ODataException/SenseNetSecurityException/Message - The Visitor user cannot be owner of a content.

Version

Affected version: 7.7.7