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

    lead generation

    To Lead or not to Lead, that is the question! | Salesforce Guide

    Blog in Others, Sales, Salesforce

    Back when things were normal and we were able to go on-site and talk with our clients, there were a significant number of them who…

    Approval, Clients, Contact, Contact Creation, Convert your Leads
    Stimulus Consulting Nov 26, 2020
    2,368  Views
    Current Record Id

    How to Get Current Record Id in Lightning Web Component | Salesforce Developer Guide

    Blog in Lightning

    Getting record in Lightning Aura Component is quite easy, we use force:hasRecordId and get the result in controller by using,  getRecordId:function(component,event, helper){   var currentRecordId…

    Component, Contact Detail Page, Contact Record, Contact Tab, Controller
    krati vishnoi May 4, 2021
    36,760  Views
    Custom MetaData Types

    All About Custom MetaData Types | The Salesforce Developer Guide

    Blog in Data, Others, Salesforce

    Custom metadata is packageable, adjustable, upgradeable, and deployable application metadata. To start with, you make a custom metadata type, which characterizes the type of application…

    Application Metadata, CSV File, Custom Fields, Custom Fields Values, Custom Metadata
    krati vishnoi Dec 24, 2020
    3,997  Views

    Popular Salesforce Videos

    Add Intelligence to Any Salesforce App with Einstein Discovery

    Add Intelligence to Any Salesforce App with Einstein Discovery

    Video in Salesforce Einstein

    Bring intelligence in the context on any Force.com app thanks to the power of Einstein Data Discovery. Any Salesforce Admin or Developer can add in…

    Salesforce Developer, Salesforce Process Builder, Salesforce Applications, Salesforce Einstein, Machine Learning
    Ashley Nov 23, 2018
    1,912  Views
    Tips on Lightning Combo Box, Events in Lightning App Builder, and More

    Tips on Lightning Combo Box, Events in Lightning App Builder, and More

    Video in Lightning, Salesforce Training

    Watch this video by Salesforce Developers to get the tips on Lightning Combo Box, Events in Lightning App Builder, and more. Watch and learn, do…

    Salesforce Training, Salesforce Tutorial, Salesforce Lightning, Lightning App Builder, Salesforce Developers
    Prafull Nov 9, 2021
    2,269  Views
    Get Started with Salesforce for Recruitment and Admissions: Recruitment and Marketing

    Get Started with Salesforce for Recruitment and Admissions: Recruitment and Marketing

    Video in Others, Marketing

    This webinar is designed for Salesforce admins and users who work in Recruitment and Admissions. It covers all you need to know about using Salesforce…

    salesforce, Salesforce Tools, Salesforce Admins, Salesforce Webinar, Salesforce Video
    Nauman Jul 28, 2020
    1,439  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.