Disabling Group Creation

Hello. I am in the 30 day trial period and I am having an issue and can’t send a support ticket yet in the trial. Here is the issue:

WordPress; CometChat Pro; Plugin Installed; chat embedded in page.
I have disabled the ability for the default user level to not be able to create groups. I am testing my admin role vs the default now. For starters, I did log out and log back in for both user levels (SSO) after changing the user role settings.

For the default role I can still see the “New” icon to create a new group. I am able to name it and choose public. After I click “Create”, the chat window disappears as if the embed is not even on the page. Then I refresh and the chat reappears. It appears that disabling the group creation works because it did not create a group. But why does it make the chat embed disappear? Why does it even allow me the idea that I can create a group chat when it is obviously disabled?

I did the same on the admin role level, but group creation is enabled and I am able to create groups. No issues.

This is on a testing page.

@kev Can you please attach a screenshot or a video of this issue?

1 Like

I uploaded a video to my Google Drive showing what is happening.
https://drive.google.com/file/d/1aER9SlgkoK4T9ygaCvkEszTd0p1O2FRJ/view?usp=sharing

Hi @kev,
Could you please check if there are any errors in the browser console (when the chat disappears on click of create) and share them with us?

Hi @kev ,
You can create 2 different widgets one for each role and write conditional code based on the role. Please refer this link for writing conditional code based on roles: How to Display Content Based on WordPress User Roles

2 Likes

Thanks @priyadarshini.nadar. I think that just doesn’t solve the problem it has and just masks the issue and I would rather not write custom php in order to fix this. Disabling the Group creation should not show a “New” icon on the Groups tab to users. If I can’t get past this part easily, I just won’t purchase.

I can’t put the code here because it has more than two links in it and I am a “new” user.

I put the Console errors in a Google Doc:

Hi @kev,
Support for Roles and Role permissions are not available in Chat Widget as of now. It will be implemented in the upcoming weeks. The above-mentioned approach is a workaround.

1 Like

OK. Thanks for that information. I’ll look into patching this via the instructions you provided.

Hi @kev,
I have added you to the feature request for role-based permission. Our product team will reach out to you whenever there are any updates.
You can also track progress using the link below:
Role based permissions for Chat widgets | CometChat Pro | CometChat.

Feel free to reach out to us on help@cometchat.com for any technical support.
Have a great day! :slight_smile:

1 Like

@kev The current solution is to create two Chat Widgets, one with group creation feature enabled and one without.

And then you can use this guide to display different chat widgets based on the logged-in user.

So the solution is for me… Instead of create two chats and hide one… I can create the groups I want for the event ahead of time in the admin area. But I have to know ahead of time what groups to create… just a small bit of pre-planning, but very workable.

Happy to hear that. Please let us know if anything else!

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