- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2015 03:40 PM
I have a need to lock down the entire ACL of a task record, to only the user who in which the task is assigned to. This task and others like it, will be automatically assigned to specific users by a workflow, and if the assigned to field is ever blank an admin can simply take over and assign it to someone (or similar operation).
I've tested making a new ACL record for sc_task (not sc_task.* for the relevant records), but in the condition builder the closest item I could find is "Assigned to = is (dynamic)", what I'd need is an "Assigned to = is NOT (dynamic)".
Anyone have any idea how this can be setup, and scripted if necessary?
Thank you.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2015 04:22 PM
Shane,
Small correction in the script is
getAccess();
function getAccess()
{
if(current.private == "Yes")
{
if(current.assigned_to == gs.getUserID())
{
return true;
}
else
{
return false;
}
}
return true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2015 03:53 PM
You can write this script in a write access control on sc_task.*
current.assigned_to == gs.getUserID();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2015 03:54 PM
Shane,
Have the ACL script has something like:
getAccess()
function getAccess()
{
return (current.assigned_to == gs.getUserID());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2015 04:07 PM
How would I add another condition on to the script, to check and see if a current value on the task record matches something?
My end goal is to only show a certain kind of task (controlled by the value of "Private"), to the user it's assigned to. In any other situation it would not be visible in the system to anyone but admins.
Would it be:
getAccess();
privatetask();
function getAccess()
{
return (current.assigned_to == gs.getUserID());
}
function privatetask()
{
return (current.private == "Yes");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2015 04:09 PM
Shane,
In that case it owuld be like this:
getAccess();
function getAccess()
{
if(current.private == "Yes")
{
return false;
}
return (current.assigned_to == gs.getUserID());
}