Permission of the user

Hi,
I am trying to get a functionality like permissions. In my usecase, the user should not be able to create groups or send message directly to another user. We will create a group in the backend and join the users and the user can communicate in the group.

Is that possible using cometchat?

1 Like

Hello @safwan,

You can achieve this using CometChat.

  1. You can create roles via the Dashboard. For example: ‘user’ does not have any clearance but ‘admin’ has the clearance to create group or send message.

  2. Then while creating a group or sending messages, you can check if the logged in user has the appropriate clearance based on the role. If yes then can carry out the action. If not you can show them a message saying You do not have enough clearance to carry out the action.

@mayur.bhandari How do you restrict it from the frontend? The frontend will communicate to the Cometchat server directly using their key. Maybe we can validate it from the frontend code, but it is not appropiate as the user can create group using their key and API call.

We can not manage permission of the user.

1 Like

@safwan We plan to add API-level restrictions for user roles. You can track this feature request at:

https://feedback.cometchat.com/cometchat-pro-feature-requests/p/fine-grained-permissions-for-user-roles

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.