As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<actionSet id="document"> [..] <action type="action-link" id="onActionArchive" permission="intranet,SiteManager" label="actions.document.archive" /> <action type="action-link" id="onEmailToSubscribed" permission="intranet,SiteManager,newsletter" label="actions.document.emailToSubscribed" /> </actionSet>
run: function Evaluator_run(node, isParent) { .. switch (nodeType) { .. case "document": .. // Google Docs editable aspect? if (node.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleEditable")) { permissions["googledocs-edit"] = true; } // Intranet document ? if (node.hasAspect("ehpo:intranetdocument")) { permissions["intranet"] = true; } // Newsletter ? if (node.displayPath.search("Nieuws/Nieuwsbrief") > -1) { permissions["newsletter"] = true; permissions["intranet"] = true; } break; } }
run: function Evaluator_run(node, isParent) { .. // When evaluating parent container if (isParent) { Evaluator.parentContainer(node, permissions); } { // based on user role var sitename = null; try { // get the current site (quick scripting - hope there's a better way) sitename = node.displayPath.split("/Company Home/Sites/")[1].split("/")[0]; // (getting the first foldername after /Company/Sites/ from the nodes path) } catch(e) { ; // Nullpointer or IndexOutOfBounds occured, so the path is not matching the expected sites pattern } var site = null; if(sitename != null) { site = Common.getSite(sitename); //retrieve the site not using siteService.getSite(sitename) but use the cached Common function } if(site != null) { // get the current user var username = person.properties.userName; // check the role of the user in this site var role = site.getMembersRole(username); permissions[role] = true; //SiteManager } } // Get relevant actions set switch (nodeType) { … }
<actionSet id="document"> [..] <action type="action-link" id="onActionAssignWorkflow" permission="start_workflow" label="actions.document.assign-workflow" /> </actionSet>
<permissionGroup name="Workflow" expose="true" allowFullControl="false" /> <permission name="_Workflow" expose="false" > <grantedToGroup permissionGroup="Workflow" /> <!– Commented out parent permission check … <requiredPermission on="parent" name="_ReadChildren" implies="false"/> –> </permission>
permissions = { "start_workflow": node.hasPermission("Workflow"), "create": node.hasPermission("CreateChildren"), "edit": node.hasPermission("Write"), "delete": node.hasPermission("Delete"), "permissions": node.hasPermission("ChangePermissions"), "cancel-checkout": node.hasPermission("CancelCheckOut") };
// When evaluating parent container if (isParent) { Evaluator.parentContainer(node, permissions); } { // based on user role var sitename = null; try { // get the current site (quick scripting - hope there's a better way) sitename = node.displayPath.split("/Company Home/Sites/")[1].split("/")[0]; // (getting the first foldername after /Company/Sites/ from the nodes path) } catch(e) { ; // Nullpointer or IndexOutOfBounds occured, so the path is not matching the expected sites pattern } var site = null; if(sitename != null) { site = Common.getSite(sitename); //retrieve the site not using siteService.getSite(sitename) but use the cached Common function } if(site != null) { // get the current user var username = person.properties.userName; // check the role of the user in this site var role = site.getMembersRole(username); if(role != "SiteCustomManager"){ permissions[start_workflow] = true; } else { permissions[start_workflow] = false; } } } [..]
/** * Document and Folder common evaluators */ documentAndFolder: function Evaluator_documentAndFolder(node, permissions, status, actionLabels) { /* Simple Workflow */ if (node.hasAspect("app:simpleworkflow")) { permissions["start_workflow"] = true; // THIS LINE !!! status["simple-workflow"] = true; if (node.properties["app:approveStep"] != null) { permissions["simple-approve"] = true; actionLabels["onActionSimpleApprove"] = node.properties["app:approveStep"]; } if (node.properties["app:rejectStep"] != null) { permissions["simple-reject"] = true; actionLabels["onActionSimpleReject"] = node.properties["app:rejectStep"]; } } }