Пример #1
0
        public void InvokeTableItemRemoveAccessMember(Authentication authentication, ITableItem tableItem, AccessInfo accessInfo, string memberID)
        {
            this.CremaHost.DebugMethod(authentication, this, nameof(InvokeTableItemRemoveAccessMember), tableItem, memberID);
            var accessInfoPath = tableItem.GetAccessInfoPath();

            try
            {
                accessInfo.Remove(authentication.SignatureDate, memberID);
                tableItem.WriteAccessInfo(accessInfoPath, accessInfo);
            }
            catch (Exception e)
            {
                this.CremaHost.Error(e);
                this.repository.Revert();
                throw e;
            }
        }
Пример #2
0
        public void InvokeTableItemSetPrivate(Authentication authentication, ITableItem tableItem, AccessInfo accessInfo)
        {
            this.CremaHost.DebugMethod(authentication, this, nameof(InvokeTableItemSetPrivate), tableItem);
            var accessInfoPath = tableItem.GetAccessInfoPath();

            try
            {
                accessInfo.SetPrivate(tableItem.GetType().Name, authentication.SignatureDate);
                tableItem.WriteAccessInfo(accessInfoPath, accessInfo);
                this.repository.Add(accessInfoPath);
            }
            catch (Exception e)
            {
                this.CremaHost.Error(e);
                this.repository.Revert();
                throw e;
            }
        }