Form/Table Template Permissions

Jonathan102
Tera Guru

Hi all, 

 

I am trying to figure out how to set the permissions correctly for our users.  We would like anyone with ITIL to be able to create and edit/delete any template that ONLY they created.  We do not want them to be able to delete any template that they did NOT create.  Right now it looks like we have an OOB ACL that allows deleting of any template with the template_editor role which is apart of the itil role.

 

Is there a way to restrict deleting and editing a template to only the user who created it?

 

Thanks,

Jonathan 

2 REPLIES 2

bondatej
Tera Contributor

Hi @Jonathan102 

 

Try ceating a Delete ACL on the sys_template table with a script like this:

 

answer = current.sys_created_by == gs.getUserName();

 

ACL configuration:

Table: sys_template

Operation: delete

Requires role: template_editor (or itil depending on your design)

Advanced: true

Script:

answer = current.sys_created_by == gs.getUserName();

 

This should allow users to delete only templates where they are the creator (sys_created_by). Any template created by another user should be denied for deletion.

 

Let me know if this worked, if yes, mark this as solved. Thank you 😊

Jonathan102
Tera Guru

Thank you for the suggestion but it's still allowing them to delete.

 

Thanks,

Jonathan