Also how dashboard link when user has dashboard_access permission

The perms variable is passed into all templates and does not cause
additional queries.