I have develop LWC component which is normally used by normal users. In that lightning web component button is there as below.
<lightning-button slot="actions" label="Deactivate" onclick={DeactivateProcess}>
</lightning-button>
The above button should be only be show to System Admin Profile and Business Admin Profile. How to show the button only to those two Profiles without using record types or different page layouts?
I think this is not a good idea to get current user profile from lwc. Because User and Profile are two different object in Salesforce. You can only get user profile id by import it.
import PROFILE_ID from '@salesforce/schema/User.ProfileId';
Try to use apex and soql query for getting current user profile.