Author Topic: User permitions for templates.  (Read 4852 times)

damendieta

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
User permitions for templates.
« on: June 30, 2010, 07:46:09 pm »
Hi, I have this really big problem with templates.

When I create one, everyone can see and use it. Really big problem if you don't want your clients to know your workflow.

Well. The idea is that when creating a template you could select the users that can use that template. So in task view, when select "all" FO shows only the templates you have permission to use.


Daniel.

Murz

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: User permitions for templates.
« Reply #1 on: July 01, 2010, 03:25:12 am »
As I see, at now this is not realized in Feng Office, so I lack this feature too, but at now can't find easy way to hack.

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: User permitions for templates.
« Reply #2 on: July 01, 2010, 10:27:50 am »
Easiest workaround seems to be:

Assign templates to the workspaces you would like to use them in. Hack the "new task" menu to remove the "all" at the bottom.

Consequence: if a user has no permissions over the workspace he would only be able to create tasks and milestones and not templates.

Not sure if it helps though ....

Murz

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: User permitions for templates.
« Reply #3 on: July 01, 2010, 10:31:48 am »
Will be better is assign template to one workspace, and when building "new task" menu check the user permission to this workspace.

Because I use template only one for new workspaces (when creating many new standard tasks to specialists), and each time modify template and assign it to new workspace is not so good way.

Does you plan something like this in future versions?

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: User permitions for templates.
« Reply #4 on: July 01, 2010, 10:55:13 am »
We don't have short term plans to include this feature. Contributors or sponsors may change this, though.

Adding new permissions settings makes it much more complex to hack as changes in DB are needed.

Murz

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: User permitions for templates.
« Reply #5 on: July 01, 2010, 11:58:51 am »
Here is my hack that hide templates for users that don't have access permission to any of workspaces assigned to template.
If template isn't assigned to any workspace, all can use it.

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: User permitions for templates.
« Reply #6 on: July 01, 2010, 12:25:01 pm »
Thanks for sharing.

I took a quick look.

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.

Not the desired output. Right?

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.

damendieta

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: User permitions for templates.
« Reply #7 on: July 01, 2010, 04:08:45 pm »
How do I apply the patch?

Which file should I modify?

Thanks.

Daniel.

damendieta

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: User permitions for templates.
« Reply #8 on: July 01, 2010, 04:20:57 pm »
I was thinking maybe a permissions level change is too much.

What if the template has a "Classify" option similar to "Permissions" option in user administration.

For example:

I create a template and I want it to be in WS1 and all the sub WS. I select the WS1 and use a "apply to all sub-workspaces" button.

This way the "all" button in templates will have no use. If you want a template to be in one workspace, just classify it to the WS you want. Or, if you want it to be in all workspaces, well, just classify it in all workspaces.

I really don't understand the need of the "all" button.

Please, can someone explain me the need of "all" button, maybe it has a good use I'm not taking advantage off.

Thanks a lot.

Daniel.

Murz

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: User permitions for templates.
« Reply #9 on: July 02, 2010, 02:24:42 am »
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.patch
And that's all.