This project is read-only.

Deleting Items

Topics: Developer Forum
Aug 26, 2008 at 12:19 PM


we used n2 for a data collecting system. Within the system, every user, even anonymous user, should be able to delete items.

We try to do this with the line


and i get the error message "Permission denied" for anoymous users.

What have i to do to make this work?


Aug 26, 2008 at 9:51 PM
When you use delete the item won't be deleted. Instead it will be expired and moved to the trash. The problem is that the anonymous users isn't allowed to save the item once it's expired. I think ist's the correct behaviour however your're not out of luck. You can...

...disable security before the delete:
            N2.Context.SecurityManager.ScopeEnabled = false;

...or prevent the item from beeing moved to the trashcan:
            public class ItemDeletableByUsers : ContentItem...