Working with Bypass Media Moderation

Table of Contents

  1. About Bypass Media Moderation
  2. Query to Fetch the Permission
  3. Set the Bypass Media Moderation Permission

About Bypass Media Moderation

The bypass media moderation permission empowers members to share visual and multimedia content, including images, videos, and attachments, instantaneously. This feature circumvents the potential delays that would typically arise from a moderation review process, providing an efficient member experience where timely content sharing is essential.

You can set this permission at the following levels:

  • Community
  • Category
  • Forum
  • Blog
  • KB
  • Occasion (Event)
  • Group
  • Idea

Note: Only Admins and Moderators can set this permission for your community.

Query to Fetch the Permission

You can use the below query to view your community bypass media moderation permission.

{
  permissionsForCoreNode(id: "community:DocsCommunity") {
    ... on CommunityPermissions {
      bypassMediaModeration {
        access
      }
    }
  }
}

GraphQL Response:

{
  "data": {
    "permissionsForCoreNode": {
      "bypassMediaModeration": {
        "access": "DENIED"
      }
    }
  }
}

Set the Bypass Media Moderation Permission

Note: Only Admins and Moderators can set this permission for your community.

Setting Community-Level Permissions

Use the setCommunityPermissions mutation to set the bypass media moderation permission for your community.

mutation {
  setCommunityPermissions(updateInput: {
    bypassMediaModeration: {
      access: GRANTED
    }
  }) {
    result {
      bypassMediaModeration {
        access
      }
    }
  }
}

GraphQL Response:

{
  "data": {
    "setCommunityPermissions": {
      "result": {
        "bypassMediaModeration": {
          "access": "GRANTED"
        }
      }
    }
  }
}

Setting Role-Based Permissions

Use the setCommunityPermissionsForRole mutation to set bypass media moderation permission for a specific role at the community level.

mutation {
  setCommunityPermissionsForRole(
    roleName: "BlogAuthor",
    updateInput: {
      bypassMediaModeration: {
        access: GRANTED
      }
    }
  ) {
    result {
      bypassMediaModeration {
        access
      }
    }
  }
}

GraphQL Response:

{
  "data": {
    "setCommunityPermissionsForRole": {
      "result": {
        "bypassMediaModeration": {
          "access": "GRANTED"
        }
      }
    }
  }
}