Restriction of dashboard to a particular user

Is there any way using configuration file to restrict particular user to view a dashboard
(I know how to restrict by going to dashboad->settings–>permision)

I wanted to know,if we can do the same using some config file

Please help me out

Thanks