Role-Based Access Control

Modified on Fri, 28 Oct, 2022 at 2:52 PM

As the feature's name suggests, you can control who gets access to certain features based on their roles. 

For example, if my community website has users with different membership levels. I can give only Premium Members access for Audio and Video calling and Basic members can only be given text chat access. This helps with monetization as well! 

Or for example, on my e-learning website, I only want to allow teachers to create Groups and not students. I can do it with our Role-Based Access Control feature! 

Fetching Roles

Firstly, assigning roles to users has to be done by you as a part of your website's user management. AtomChat should then be able to fetch these roles for each user.

You have to set the JavaScript variable "chat_role" along with other AtomChat variables (chat_id, chat_name, etc) and pass the values of roles for example "Role A" and "Role B"  dynamically.

<!-- USER MANAGEMENT CODE -->

<!-- Refer to User Management guide for this code -->
  
<!-- USER ROLE CODE -->
  
<script>
var chat_role = 'Premium Member';
</script>

<!-- LAUNCH ATOMCHAT CODE -->
  
<!-- Refer to Launch AtomChat page for this code -->

Variable

Description

Mandatory

chat_role

User role

Yes


Once the "chat_role" variable is set, at least one user with each role has to log in to your website. As and when users with different roles keep logging in, the Roles will get added to AtomChat. 

To set the feature permissions 

  • Go to your AtomChat Admin Panel -> Settings -> Role-Based Access 
  • You will see all your user Roles -> Click on each to set permissions





NOTE: AtomChat has two default roles as you see in the image above,  User(Logged-in) i.e. Default, and Guest.

For WordPress

If you have a WordPress site along with the AtomChat plugin installed, then your WordPress's default user roles or roles created via your Membership plugin are added.

AtomChat plugin has built-in Role configuration for the following WordPress Membership Plugins-

  1. PaidMembershipPro
  2. MemberPress
  3. UltimateMember

If you are using a plugin that is not listed here, don't worry! Please reach out to us at [email protected] with details and get it configured for you! 











Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article