Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How to restrict the controller action for users which are logged in using “Grant Login Access” in Salesforce?

    Tagged: Apex Class, Apex Controller, Controller Action Methods, Grant Login Access, Salesforce Visualforce Page, System Administrator

    • Salesforce® Discussions

      How to restrict the controller action for users which are logged in using “Grant Login Access” in Salesforce?

      Posted by Aman on September 22, 2018 at 9:39 PM

      A Visualforce page and Controller is created. How to restrict the controller action for users which are logged in using “Grant Login Access” in Salesforce?

      Parul replied 8 years ago 3 Members · 2 Replies
      • Apex Class
      • Apex Controller
      • Controller Action Methods
      • Grant Login Access
      • Salesforce Visualforce Page
      • System Administrator
    • 2 Replies
    • shariq

      Member
      September 22, 2018 at 9:39 PM

      When System admin logged in on the behalf of any other user. On upper right corner message is displayed that user is logged-in on behalf of some other user. In Visualforce page we can search for the element with class name present or not? If the element with that Class name exist means logged-in user is not a actual user.

    • [adinserter block='9']
    • Parul

      Member
      September 23, 2018 at 5:30 AM

      There's no supported way to detect that a user is masquerading as another user via Grant Login Access. I have seen some suggestions around cookie sniffing, but as you want to restrict access I'd say that would be a very fragile.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Test Classes In Apex

    Test Classes In Apex Salesforce | The Developer Guide

    Blog in Salesforce Apex

    Best Practices of Test Class in Salesforce @TestVisible - To access private member in Test Class Test.LoadData - Creating test data without code System.RunAs -…

    Apex Salesforce, Salesforce, Salesforce Apex, salesforce learning, Salesforce Training
    Arpit Nov 11, 2021
    11,832  Views

    Top 10 Salesforce Interview Questions with Answers

    Blog in Salesforce Admin

    The success and prosperity of any modern business depend on its ability to communicate with customers and meet their demands. That is why efficient Customer…

    Business, Certified Salesforce Admins, Certified Salesforce Developers, Communicate With Customers, Communication Platform
    CRS Aug 9, 2021
    5,280  Views
    Users Permissions and Access in Salesforce

    Learn About Users Permissions and Access in Salesforce

    Blog in Others

    1. User Permissions User permissions determine what tasks users can perform and what features users can access. For example, users with the “View Settings and…

    API, App, AppExchange, Application Permissions, Configuration
    Mohit Kumar Sep 21, 2022
    4,035  Views

    Popular Salesforce Videos

    Getting Business Insights From Telephony Data in Salesforce

    Getting Business Insights From Telephony Data in Salesforce

    Video in Sales

    Big Data, Data Analytics and Data mining are big terms that often sound like they are only for the ‘giant corporation‘ and put people off…

    salesforce, Data Integration, Saleforce Big Data, CTI, phone
    Ian Mar 19, 2020
    1,633  Views
    Easy Way to Learn Salesforce | How to Learn Salesforce Step by Step

    Easy Way to Learn Salesforce | How to Learn Salesforce Step by Step

    Video in Salesforce Training

    In this video on Easy Way to Learn Salesforce, you will learn introduction to Salesforce, how to learn Salesforce easily, Salesforce as Career and Growth,…

    Learn Salesforce, Easy Way To Learn Salesforce, Introduction To Salesforce, Salesforce Career, Salesforce Learning
    Rupal Kakkar Aug 6, 2021
    1,797  Views
    Salesforce Apex Trigger Best Practices | Learn Salesforce Series By Algoworks

    Salesforce Apex Trigger Best Practices | Learn Salesforce Series By Algoworks

    Video in Salesforce Apex

    In this video, the following points will be covered - 1. One Trigger Per Object 2. Logic-less Triggers 3. Context-Specific Handler Methods 4. Code Bulkification…

    Salesforce Consultant, Salesforce Apex Trigger, Testing, support, Learn Salesforce Series
    Algoworks Sep 10, 2020
    3,119  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.