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 7 years, 11 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.

    • [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

    B2B Commerce

    How Does the Store Work in B2B Commerce? | Salesforce Guide

    Blog in Others, Salesforce

    The primary thing to get done with regards to understanding the B2B Commerce information model is understanding the part of the store. The store in…

    Authoritative Standard Permitting, B2B Commerce, B2B Commerce Information Model, B2B Stores, Book Passage
    MOHIT May 7, 2021
    4,119  Views
    Apex Basics

    Apex Basics and Database | Salesforce Apex Tutorial Guide

    Blog in Salesforce Apex

    In this blog we’ll learn about Apex, Apex features, Features not supported by Apex, when to use Apex, Flows of Action, Apex Environments, and Tools…

    Apex Platform, Built-in Support, Business Logic, Code in Apex, Database
    Tanya Joshi May 6, 2022
    4,711  Views

    Salesforce for Public Sector: Enhancing Public Services with Salesforce

    Blog in Salesforce

    The public sector is no exception - and it is changing at a breakneck speed in an era when technology is revolutionizing every facet of…

    Automated Workflows, Data Integration, Decision Making, Public Sector Efficiency, Public Sector Organizations
    TechForce Jun 17, 2024
    742  Views

    Popular Salesforce Videos

    Salesforce Anywhere: Technology Enabling the All-Digital, Work-From-Anywhere World

    Salesforce Anywhere: Technology Enabling the All-Digital, Work-From-Anywhere World

    Video in Salesforce Products

    While companies, governments and organizations are slowly returning to their offices, the COVID-19 pandemic has changed the future of work forever. In fact, nearly 70…

    salesforce, CRM, Trailhead, Customer Success, Customer 360
    Pooja Jun 26, 2020
    1,784  Views
    Different tools use to code in APEX | APEX Basics | Salesforce Development Course

    Different tools use to code in APEX | APEX Basics | Salesforce Development Course

    Video in Salesforce Apex, Salesforce Training

    Are you aware of the tools that are used for writing codes in APEX? Here are the different tools that you can use to write…

    Salesforce Training, Salesforce Apex, salesforce, Apex, Force.com
    Prafull Jul 7, 2021
    2,740  Views
    Introduction to Salesforce Einstein OCR

    Introduction to Salesforce Einstein OCR

    Video in Salesforce Einstein

    In this session, we will learn about Einstein OCR and Create/Update Leads and Contacts using Business Cards. Let’s welcome an amazing #Summer20 release gem –…

    Salesforce Training, salesforce, Salesforce Einstein, Salesforce Video, REST API
    Jogender Aug 13, 2020
    2,664  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.