AnsweredAssumed Answered

Change actions available on document depend on metadata

Question asked by dabada83 on Feb 12, 2010
Latest reply on Mar 3, 2010 by dabada83
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

Outcomes