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, 2 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

    Account Based Marketing With Salesforce – 4 Proven Strategies

    Blog in Salesforce

    Account-Based Marketing is ever-growing and a widely practiced B2B Sales and marketing technique that helps acquire potential companies as your clients with networking. The first…

    B2B, B2B Companies, B2B Marketers, B2B Sales and Marketing, Businesses
    DemandBlue Sep 23, 2020
    2,144  Views
    Aura Components in Salesforce

    Overview of Aura Components in Salesforce | The Developer Guide

    Blog in Salesforce Apex

    Aura The modular, reusable parts of an app are called aura components. From a single line of text to a whole app, they stand for…

    Application Events, AURA, Aura Components, Aura Interfaces, Aura:component Tag
    ashutosh pandey Oct 7, 2022
    4,532  Views

    What worries Salesforce Users most when using their Orgs in 2024?

    Blog in Salesforce

    Salesforce is a robust platform for digitizing business operations and automating processes in an organization. However, issues sometimes arise when running the platform. I asked…

    API calls, Asynchronous Processing, Automated Regression Testing, Bug, Bulkify Code
    Brimit Jan 4, 2024
    2,532  Views

    Popular Salesforce Videos

    Volunteer Management in Salesforce Nonprofit Cloud

    Volunteer Management in Salesforce Nonprofit Cloud

    Video in Salesforce Cloud Platform

    Volunteers are a crucial part of many nonprofit organizations. With Volunteer Management in Nonprofit Cloud, you can improve every step of the volunteer process from…

    salesforce, CRM, Digital Transformation, Nonprofit, Nonprofit Cloud
    DB Nov 25, 2025
    10  Views
    Dean ERP : Salesforce ERP for Manufacturing and Distribution

    Dean ERP : Salesforce ERP for Manufacturing and Distribution

    Video in Others

    Discover how Dean ERP, powered by Salesforce, is transforming the manufacturing and distribution industry with advanced ERP solutions. From real-time inventory management to seamless order…

    Dean Nov 25, 2025
    18  Views
    Salesforce Development Tutorial - sObjects

    Salesforce Development Tutorial - sObjects

    Video in Salesforce Development

    It is very easy to learn Salesforce with the world class training tutorial. Training is key for the right knowledge. Those who work as an…

    Salesforce Development, How to Salesforce Development, Best Salesforce Tutorials, Free Salesforce Tutorials, Salesforce Video Tutorials
    Shiv Kumar Sharma Apr 20, 2018
    1,786  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

    © 2025 - 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.