So... You just want a filter for weather or not user can delete/Purge the topic?
If not, then how would that filter work?
Deleting just changes one attribute of a topic, and purging deletes it from database.
purge functions for topics only take
uid (of the caller), so I don't really know what a filter could do here. Unlike on deleting a post there is no equivalent to
postData there, so unless you want to delete different topic than you were trying to or make it seem like a different user did it, I don't know in what way that would be useful.
Before the actual delete function is called, there is a check for wether or not user has the right privileges, but I think a more general
privileges.can filter (or probably 2: one for category and one for global privileges) would be better than a dedicated filter for topic deletion privileges.
Edit: Ah, I misunderstood. You want a filter that will allow you to reject topic deletion and I didn't even think of that. This post isn't really relevant here then, but I'll still leave it for the part with