Template permissions on user/group level

We need to be able to customize permissions for templates.
So that not all managers have access to all templates.
Permissions should be customizable by department, for example.