I need to change the actions availables on documents depends on metadata. I found a function on document-actions.js but my changes seems that no have effect.original function
for (i = 0, ii = actions.length; i < ii; i++)
{
action = actions[i];
actionAllowed = true;
if (action.firstChild.rel !== "")
{
actionPermissions = action.firstChild.rel.split(",");
for (j = 0, jj = actionPermissions.length; j < jj; j++)
{
if (!userAccess[actionPermissions[j]])
{
actionAllowed = false;
break;
}
}
}
mi change
for (i = 0, ii = actions.length; i < ii; i++)
{
action = actions[i];
actionAllowed = true;
if (action.firstChild.rel !== "")
{
actionPermissions = action.firstChild.rel.split(",");
for (j = 0, jj = actionPermissions.length; j < jj; j++)
{
actionAllowed = false;
break;
}
}
best regards