Depending upon your requirements and number of users, you may be able to do something similar to what I did...
if [ $LOGNAME = "bob" ] || [$LOGNAME = "dave" ]
then
<command>
else
echo "Not authorized"
fi
*This is rather simplistic, but all I really needed to do was keep some users from accessing certain options that they had no business executing. In the end, to avoid questions from users asking why they weren't authorized, I made a top level menu that had all of the options available for admin users and the else displays a 2nd menu where the restricted options weren't even listed. That has worked well because they don't miss what they can't even see (or know exists) ;-)