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

    Domain Security

    What is Enhanced Domain Security in Salesforce in 2023?

    Blog in Salesforce Security

    What is Enhanced Domain? Enhanced domains are the latest version of My Domain that meets the latest browser requirements. With enhanced domains, all URLs across your…

    browser-security, content files, cookies, Database.com, Domain Security
    SF Dec 12, 2022
    4,456  Views

    Update: Our Salesforce WordPress Portal Has a Page Builder Feature Now!

    Blog in Salesforce Data integration

    We are pleased to announce that we have added a brand new feature to our Salesforce WordPress customer portal, drag and drop page builder with…

    CMS, Customer Portal, Customers, Drag and Drop Builder, Drop Page Builder
    CRMJetty Sep 15, 2020
    2,358  Views
    How to Create a Partner Community Salesforce Account?

    How to Create a Partner Community Salesforce Account?

    Blog in Salesforce Products

    Partner Community : The Partner Community connects you directly to other partners with the power of social collaboration and mobile access. Steps to create a…

    Salesforce Account, Salesforce Integration Partners, Salesforce Partner, Salesforce Partner Community, Salesforce Partnership
    Aman May 11, 2018
    16,047  Views

    Popular Salesforce Videos

    Slack "Work In Progress" Commercial | Where the Future Works | Success Anywhere | Salesforce

    Slack "Work In Progress" Commercial | Where the Future Works | Success Anywhere | Salesforce

    Video in Salesforce Stories

    We are HERE. The future? We made it! Maybe it's not quite what we envisioned, but here's the thing: the future is forward movement from…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Slack
    Pooja Aug 18, 2021
    1,838  Views
    Salesforce Nonprofit Cloud Implementation Guide

    Salesforce Nonprofit Cloud Implementation Guide

    Video in Salesforce Implementation

    While Salesforce offers a variety of tools that can help a nonprofit organization, the latest and greatest of these is Salesforce Nonprofit Cloud. Nonprofit Cloud…

    salesforce, CRM, Digital Transformation, Salesforce Nonprofit Cloud, Program Management
    DB Nov 25, 2025
    72  Views
    How to Enable and Create the B2B Marketing Analytics App in Salesforce

    How to Enable and Create the B2B Marketing Analytics App in Salesforce

    Video in Marketing

    This video will walk through the steps to enable Pardot B2B Marketing Analytics in Salesforce Setup, and the creation of the B2BMA app. Prerequisites and…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Setup
    Rupal Kakkar Jan 27, 2022
    3,147  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.