current_user_can()

WordPress Function

Official Docs