2

How to restrict your lighting component to display only in Internal (Employee) Community and not in Partner or Customer Communities?

Has anyone tried to do the above? Can you do it using Feature Management? How do you find out if the user is using it in External Communities? Will SOAP Network API property "OptionsAllowInternalUserLogin" work? We are thinking to only restrict the feature to use the lightning component in External Communities and only allow for internal. What the best effective way to do this?

  • 1
    How/Where is your component added? Is the UX same for Internal vs. External User? Can you edit your question and provide further details? – Jayant Das May 21 at 19:05
  • @JayantDas I have a managed package lightning component and I want to restrict customer/partner users on communities in subscriber Org by using Feature Parameter. – Faisal May 22 at 17:50
1

Yes. In Lightning Communities you can assign audiences to most Lightning Components as follows:

Select the component

1) Click the drop down arrow in the upper left 2) Under the Audience section, click Assign

enter image description here

The Audiences window will pop up (pictured below)

You can name the audience to re-use for other components. Select a criteria type of Profile For your internal component -

Criteria Type: Profile 
Operator: Does Not Equal
Value: Enter all of the Community profiles you'd like to exclude

For your external component -

Criteria Type: Profile 
Operator: Equals
Value: Enter all of the Community profiles you'd like to include

enter image description here

  • I'm not looking for that. I have a managed package lightning component and I want to restrict customer/partner users on communities by using Feature Parameter. – Faisal May 22 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.