Пример #1
0
        protected override IEnumerable <string> MergeDependencies(IJsonToken json, bool overwrite)
        {
            if (json.Permissions == null)
            {
                return(Enumerable.Empty <string>());
            }

            return(MemberPermissions.Merge(json.Permissions.FirstOrDefault(p => p.ModelType == TokenModelType.Member), overwrite)
                   .Concat(BoardPermissions.Merge(json.Permissions.FirstOrDefault(p => p.ModelType == TokenModelType.Board), overwrite))
                   .Concat(OrganizationPermissions.Merge(json.Permissions.FirstOrDefault(p => p.ModelType == TokenModelType.Organization), overwrite)));
        }
Пример #2
0
 protected override IEnumerable <string> MergeDependencies(IJsonToken json)
 {
     return(MemberPermissions.Merge(json.Permissions.FirstOrDefault(p => p.ModelType == TokenModelType.Member))
            .Concat(BoardPermissions.Merge(json.Permissions.FirstOrDefault(p => p.ModelType == TokenModelType.Board)))
            .Concat(OrganizationPermissions.Merge(json.Permissions.FirstOrDefault(p => p.ModelType == TokenModelType.Organization))));
 }