public static bool CheckManageListPermission(NodeType nodeType, Node targetNode) { // silent error handling if (nodeType == null || targetNode == null) { return(true); } return((!nodeType.IsInstaceOfOrDerivedFrom("ContentList") && !nodeType.IsInstaceOfOrDerivedFrom("Workspace")) || targetNode.Security.HasPermission(PermissionType.ManageListsAndWorkspaces)); }
// --------------------------------------------------------------------- private static string GetRewritePath(NodeHead appNodeHead, PortalContext portalContext) { if (!String.IsNullOrEmpty(portalContext.QueryStringNodePropertyName)) { return(appNodeHead.Path); } NodeType contextNodeType = appNodeHead.GetNodeType(); if (contextNodeType.IsInstaceOfOrDerivedFrom("Page")) { return(appNodeHead.Path + PortalContext.InRepositoryPageSuffix); } if (contextNodeType.IsInstaceOfOrDerivedFrom("Site")) { throw new NotSupportedException("/*!!!*/"); } return(appNodeHead.Path); }