2 Replies Latest reply on Apr 27, 2017 10:50 PM by Jeff Shurtliff

    Check if user belongs to a security group using JavaScript

    Jeff Shurtliff

      Hi all,


      Does anyone know if it's possible to check whether or not a user belongs to a certain security group using JavaScript?

      We are wanting to display certain hyperlinks in an HTML widget only if a user belongs to a specific security group. (e.g. an "Employees" group, etc.)


      We are already using JavaScript to display different content depending on whether or not a user is logged in, as shown below, but I'm not sure how to do so when a user belongs to a specific security group.


      "use strict";



           * If the user isn't logged in, they see a Login and Register button in the widget.

           * If they are logged in, they see other buttons.




          var userid = window.parent._jive_current_user.ID;

          if(userid == "undefined" || userid < 1) {





          } else {




              // User is in the group       








              }, 500);







          $("#iframe-login").on("click", function(){








      Any ideas?