Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • 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
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • 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
    • Marketplace
    • Advertise With Us
    • 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 7 years, 4 months 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.

    • 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

    application solution

    Popular Salesforce Blogs

    Data Quality Analysis

    Data Quality Analysis Dashboard App in Salesforce

    Blog in AppExchange, Data

    As you all know about the importance of Data Integration in Salesforce, we should understand that before Data integration, Data Quality analysis and management are…

    Bad Data Quality, Business Goals, Business Objectives, Business Productivity, Business Revenue
    Melonleaf Mar 24, 2022
    7,922  Views

    New Salesforce Agentforce Accelerator Empowers Nonprofits for Greater Impact

    Blog in Salesforce

    Salesforce has launched the Agentforce Accelerator for Impact, an initiative to help nonprofits harness Agentforce, an innovative AI layer on the Salesforce Platform. This technology…

    Cloudmetic Aug 1, 2025
    196  Views

    Top 5 Ways a Salesforce CRM Can Help in Building Relationship with Clients

    Blog in Salesforce

    Customer Relation Management or CRM is absolutely helpful in increasing your business and generating higher revenues every day. To ensure that your business venture receives…

    Build Sustainable Relationships, Building and Maintaining Better Relationships, Building Relationship, Business, Business Empire
    360 Degree May 10, 2021
    2,125  Views

    Popular Salesforce Videos

    How to Filter and Organize Your Data | Salesforce Essentials

    How to Filter and Organize Your Data | Salesforce Essentials

    Video in Data, Lightning

    In this video, you will learn how list views help you group people and deals so you can find the data you need faster. Salesforce…

    salesforce, Salesforce Video, Salesforce Essentials, Salesforce Learning, Data
    Neha Yadav Aug 19, 2020
    2,020  Views
    Introduction to Lightning Web Components (LWC)

    Introduction to Lightning Web Components (LWC)

    Video in Others

    Why Lightning Web Component (LWC) Part 1 - Vanilla HTML5 Web Components Benefits of Web Component Pillars of Web Component Demo of Custom Element and…

    Salesforce Lightning Components, Easy Way To Learn Salesforce, How To Learn Salesforce Lightning, Best Salesforce Tutorials, Salesforce Lightning Tutorial
    Apex Feb 11, 2019
    4,794  Views
    Security for Salesforce Developers: Data Security

    Security for Salesforce Developers: Data Security

    Video in Salesforce Security

    In this series, we review the most important concepts that developers must understand to create secure applications on the Salesforce platform. We talk about data…

    Salesforce Training, Salesforce Tutorial, Salesforce Developer, salesforce, salesforce platform
    Prafull May 12, 2021
    1,935  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®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.