Article Moderation/Abuse Management

The abuse/moderation system automates abuse detection and reporting to prevent SPAM and other abuse from entering the platform. Individual abuse detectors handle events applicable to their abuse detection logic and notify the abuse service when abuse is detected.

The IAbuseCheckingContentType  interface defines the methods necessary to support the Abuse/Moderation workflow . Content types implementing this service can be marked as abusive, hidden if enough marks are added, and moderated using the abuse UI. Additionally abuse supporting content types are included in moderation support -- if an author is moderated, then all of their content in abuse-checking content types will be moderated.

Why Should I Allow My Content to be included in the Abuse/Moderation Workflow?

To help promote clean and honest community members. Those who are responsible for questionable content are emailed that their content is being considered abusive and can appeal the finding.

Creating an Abuse Checking Content Type

In this sample we build upon the Content Type  sample. We took the IContentType  implementation and added an implementation of the IAbuseCheckingContentType  plugin interface:

public class LinkItemContentType : IContentType, ITranslatablePlugin, IAbuseCheckingContentType

The IAbuseCheckingContentType defines a few members that need to be implemented:

  • CanUserReviewAppeals(): this method is deprecated and can just return false.
  • ContentSuspectedAbusive(): called when the abuse system identifies content managed by this content type as abusive. The content type is expected to flag the content internally and not show it normally (hide it).
  • ContentFoundNotAbusive(): called when the abuse system determines that content managed by this content type that was previously suspected as abusive is safe. The content type is expected to unclog the content internally and included it normally (unhide it).
  • ContentConfirmedAbusive(): called when the abuse system is expunging abusive content managed by this content type. The content type is expected to remove/delete the content permanantly.
  • GetHiddenContent(): called when the abuse system needs to show details about content managed by this content type that may not normally be visible (it may be hidden). This is a privileged call that should not check permissions or abuse status and should always return the content if it still exists to support the moderation/abuse system and user interface.

The implementation of these methods for the Links example is below. Note that this also requires changes to the LinksData and Link classes to enable writing to Link.IsEnabled (for hiding suspected abusive content) and deleting links. These changes are outside of the scope of this example but are assumed to be implemented by this sample code.

#region IAbuseCheckingContentType

public bool CanUserReviewAppeals(Guid contentId, int userId)
{
	//Deprecated: The service now uses the group or site Manage Abuse permission
	return false;
}

public void ContentSuspectedAbusive(Guid abuseId, Guid contentId)
{
	var content = LinksData.GetLink(contentId);
	if (content == null)
		return;

	content.IsEnabled = false;
}

public void ContentFoundNotAbusive(Guid abuseId, Guid contentId)
{
	var content = LinksData.GetLink(contentId);
	if (content == null)
		return;

	content.IsEnabled = true;
}

public void ContentConfirmedAbusive(Guid abuseId, Guid contentId)
{
	LinksData.DeleteLink(contentId);
}

public IContent GetHiddenContent(Guid contentId)
{
	return LinksData.GetLink(contentId);
}

#endregion