User Permissions

There is the option to set a user as a mod or super mod. I would like to know the following things:

  • What is the difference between Mod & Super Mod?
  • How (from the SDK side) can you determine whether a user has one of these roles?

Without that it is almost impossible to make a UI that allows the mods to review content, because you can't determine who is a mod or not.

1 Like

Hey there, we'll add the answer your question to the documentation to help the next person thank you! In mean time here's the permissions:

What is the difference between Mod & Super Mod?
The main difference is a super moderator has all the permissions and should be only given to staff while the moderator has reduced permissions so you can give it to your trusted community members for example.

In terms of permissions here is the difference:

Super Moderators:
Can approve content: ✔️
Can reject content:✔️
Can view content requiring moderation: ✔️
Can ban player: ✔️
Can unban player: ✔️

Moderators:
Can approve content: ✔️
Can reject content:✔️
Can view content requiring moderation: ✔️
Can ban player: ❌
Can unban player: ❌

How (from the SDK side) can you determine whether a user has one of these roles?

The SDK currently does not have an endpoint for checking if a player is a moderator.

For now this end point here should be used because it will fail if the player is not a moderator.

The UGC Unity Package exposes that endpoint as SearchContentModerationAsync. If the player is not a moderator, it will throw with UgcErrorCodes.Unauthorized

I've taken this back to our team to explore adding this to the SDK. Thanks for the feedback!

1 Like

Thanks a lot for the quick response! I will therefore use the mentioned endpoint until a more convenient solution is published.

After some experimenting, I am marking this thread again as open.

First of all, if the SearchContentModerationAsync method fails due to the wrong permissions, it throws a RequestFailedException with ErrorCode 53 (meaning Forbidden). It does not throw a UGCException with code Unauthorized. Full error message:
Unity.Services.Core.RequestFailedException: Forbidden - Make sure you have the required permissions to make this request.

Secondly, I needed to grant the Super Moderator permission to the user to get any moderation content. Now, after deleting the permissions I can't reassign Moderator permissions to the same exact user. It gives me the error Failed to create moderator. Please try again. Same for the Super Moderator permissions, it looks like the user object has broken permissions.

You should now be able to recreate and update the permissions of a previously deleted moderator.

First of all, if the SearchContentModerationAsync method fails due to the wrong permissions, it throws a RequestFailedException with ErrorCode 53 (meaning Forbidden). It does not throw a UGCException with code Unauthorized.

We will investigate.

1 Like