SenseNet.ContentRepository.Storage.Security.PermissionEvaluator.GetParentInfo C# (CSharp) Method

GetParentInfo() private method

private GetParentInfo ( string path ) : PermissionInfo
path string
return PermissionInfo
        private PermissionInfo GetParentInfo(string path)
        {
            if (path.ToLower() == "/root")
                return null;

            return GetFirstInfo(RepositoryPath.GetParentPath(path));
        }
        private PermissionInfo GetFirstInfo(string path)

Usage Example

Example #1
0
        private static void ParseInfo(string src, PermissionEvaluator newInstance)
        {
            var sa = src.Trim().Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            foreach (var s in sa)
            {
                var permInfo = PermissionInfo.Parse(s);

                var parent = newInstance.GetParentInfo(permInfo.Path);
                if (parent != null)
                    parent.Children.Add(permInfo);
                permInfo.Parent = parent;
                newInstance.permissionTable.Add(permInfo.Path, permInfo);
            }
        }
All Usage Examples Of SenseNet.ContentRepository.Storage.Security.PermissionEvaluator::GetParentInfo