function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LuvaraLuvara 

Restrict User Actions when "Logged in As"

I am trying to figure out if there is a way to restrict actions through apex when a user is logged in on behalf of another user. For instance, one of our internal Salesforce users is logged in as a Partner Portal user. Is there a method we can use to restrict them from an action on our custom page?

 

I cannot find anything in the documentation.

 

Thanks,

 

Chris

 

Santhosh KumarSanthosh Kumar

I don't think there is any way for you to identify if current portal context is in emulating mode and hence you cannot take any action based on that. However, having this ability is really good one.