Search Unity

Question User Permissions

Discussion in 'Unity User-Generated Content' started by MiTschMR, Apr 25, 2023.

  1. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    489
    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.
     
    zjebali likes this.
  2. zjebali

    zjebali

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    20
    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!
     
    Last edited: Apr 26, 2023
    SebT_Unity likes this.
  3. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    489
    Thanks a lot for the quick response! I will therefore use the mentioned endpoint until a more convenient solution is published.
     
  4. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    489
    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.
     
  5. sdesilets_unity

    sdesilets_unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    2
    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.
     
    MiTschMR likes this.