Saturday 23 September 2017

Remove Forums link from CRM Portal Main Menu for unauthenticated users

Usually, we can manage hide/show of web links using web page access control rules in CRM Portals. But there are few links available on the portal that you cannot hide/show using access rules due to its own limitation. Forum link is one of them.

Below is the code that you need to add in Header Web Template in order to hide/show Forums web link for anonymous users in CRM Portal.

Paste the code in below-mentioned location in Header Web Template:



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
var loggedInUserRole = '{{ user.roles }}';
if (loggedInUserRole.indexOf("Administrator") >= 0)
{
 $('a:contains("Forums")').parent().next().show();
 $('a:contains("Forums")').show();
}
else
{
 $('a:contains("Forums")').parent().next().hide();
 $('a:contains("Forums")').hide();
}
</script>

Anonymous User :


Administrator User :







1 comment:


  1. Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to

    (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time.

    Contact him now and thank me later.

    ReplyDelete

Blogger Widgets