Roles & Permissions
AmityClient class provides a method hasPermission(_:) which allows you to check if the current logged in user has permission to do stuffs in given channel.
We determine a user's moderation capabilities based on their current role. Amity SDK has the following default roles:
  1. 1.
    Member - has no moderation privileges
  2. 2.
    Community/Channel Moderator - can assert general moderation privileges on other users
  3. 3.
    Super Moderator - can assert general moderation privileges and be exempt from moderation from other users
  4. 4.
    Global Admin (Admin Only) - can assign the roles of others, assert all moderation privileges and be exempt from moderation
A user's role can be changed via Console. Refer to Moderation, Roles & Privileges for the instructions on how to change a user's role.
The Global Admin role cannot be assigned to a user.
Below are tables for each category that show the default roles and permissions. You can create new roles and assign a specific set of permissions for each role in the ASC Console. Refer to Moderation, Roles & Privileges.

User

Permission
Global Admin
Super Moderator
Community Moderator
Channel Moderator
ASC Console Access
Create, Edit, & Delete, Roles
Ban & Edit User*
Exempt from filters
Exempt from rate limits
Exempt from mute
Exempt from ban
Exempt from blacklist & whitelist
Exempt from repitition check
*UserV3

Channel

Permission
Global Admin
Super Moderator
Community Moderator
Channel Moderator
Edit, Ban, Add, Remove, & Mute Channel User *
Edit & Mute Channel*
Edit & Delete Message*
Edit Channel Rate Limit*
Ban, Mute, Rate limit, & Manage Users
Mute Channels
Rate Limit Channels
Manage Messages
Global Access
*ChannelV3

Community

Permission
Global Admin
Super Moderator
Community Moderator
Channel Moderator
Create, delete, Edit Community Categories
Edit & Delete Communities*
Edit, Add, Ban, & Remove Community Users*
Edit, Delete, & Review Community Posts*
Edit & Delete Community Comments*
Manage Community
*CommunityV3
There is no limit to the number of moderators in a community. If there are 100 members in the community, all 100 members can be promoted to moderator. Promoting a user to a community-level moderator can be done using the Update Role API or through the SDK.

User Feed, Posts, Comments, & Notifications

Permission
Global Admin
Super Moderator
Community Moderator
Channel Moderator
Edit & Delete User Feed Post
Edit & Delete User Feed Comment
Manage Posts & Comments
Manage Network Settings

Permissions

Each role can be assigned with many permissions. Below is a list of all the possible permissions that can be assigned to a user.
Source
Permission
Description
Channel
MUTE_CHANNEL
Can mute/unmute channel
CLOSE_CHANNEL
Can close channel
EDIT_CHANNEL
Can edit channel
EDIT_CHANNEL_RATELIMIT
Can set rate limit of channel
EDIT_MESSAGE
Can edit all messages
DELETE_MESSAGE
Can delete all messages
BAN_CHANNEL_USER
Can ban/unban user from channel
MUTE_CHANNEL_USER
Can mute/unmute user in channel
ADD_CHANNEL_USER
Can add users to channel
REMOVE_CHANNEL_USER
Can add remove user from channel
EDIT_CHANNEL_USER
Can edit users in channel
User
BAN_USER
Can global ban/unban user
EDIT_USER
Can edit users
ASSIGN_USER_ROLE
Can assign role to users
User feed
EDIT_USER_FEED_POST
Can edit all posts on user feed
DELETE_USER_FEED_POST
Can delete all posts in user feed
EDIT_USER_FEED_COMMENT
Can edit all comments on user feed
DELETE_USER_FEED_COMMENT
Can delete all comments in user feed
Community
ADD_COMMUNITY_USER
Can add users to community