Looks like if a template is set to WS A and B, and I have read permissions in A but not B, I won't see the Template.
Yes, this is a bug, I fixed it in second version of patch.
PS: Just in case, because it may have other implications. Keep in mind that with this fix permissions are not being changed, it's just an option being hidden.
I understand that this patch is hide only items in menu "new task", and don't watch permissions after this. But I can't find any other way for non-admin users to view all templates and way to create task via template except this menu.
If you know some other way, please tell me, I try to add checks in it.
How do I apply the patch?
Which file should I modify?
Patch is text file, you can apply it by hands, open file from each string starts with diff, locate the strings without + or -, remove strings started with -, and add started with + (without leading + symbol).
Or if you have linux, you can do this via patch command:
Place patch file in root fengoffice folder and type:
patch -p0 <fengoffice_template_permissions_2.patchAnd that's all.