function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hema YejjuHema Yejju 

How to hide a Lightning-button based on profile

<aura:component controller="Approval"
                implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
                
                 <lightning:button variant="brand" label="Yes" class="slds-align_absolute-center"
                            title="Amount" onclick="{!c.sendEmailtouser}"
                              />
                            
                            
                            sendEmailtouser : function(component,event,helper) {
   component.find("YesBtn").set("v.disablebutton", true);
     if (state === "SUCCESS") {
         
             component.set('v.showButton',false); 
     }
 
AnkaiahAnkaiah (Salesforce Developers) 
Hi Hema,

Please refer the below link will help you.

https://developer.salesforce.com/forums/?id=9062I000000DID7QAO

If this helps, please mark it as best answer.

Thanks,
Ankaiah