Allowing specific users with admin to approve to mint NFT

Hi ,
Can anyone please help me that i am trying to allow specific users to mint an Nft , i.e. the user will first be approved from admin and then it will be allowed to mint an nft i have tried the following code but it doesnt work.

mapping(address => mapping(address => bool)) private _mintingApprovals;

function setmintApproval(address userAddress) public only owner {
        _mintingApprovals =userAddress;

function createToken(string memory tokenURI) public returns (uint){
        uint256 newItemId = _tokenIds.current();
         require(_minting Approvals(userAddress),"Sorry this address is not allowed to mint");

can anyone please help me out Thanks