Пример #1
0
        private XpandUnitOfWork CreateUnitOfWork() {
            var uow = new XpandUnitOfWork(DataLayer);

            if (SelectDataSecurityProvider == null)
                return uow;
            if (!_clientSideSecurity.HasValue || _clientSideSecurity.Value == ClientSideSecurity.UIlevel)
                return uow;
            var currentObjectLayer = new SecuredSessionObjectLayer(_allowICommandChannelDoWithSecurityContext, uow, true, null, new SecurityRuleProvider(XPDictionary, _selectDataSecurityProvider.CreateSelectDataSecurity()), null);
            return new XpandUnitOfWork(currentObjectLayer, uow);
        }
Пример #2
0
 private XpandUnitOfWork CreateUnitOfWork() {
     var uow = new XpandUnitOfWork(DataLayer);
     var securedObjectLayer = _security as ISelectDataSecurityProvider;
     if (securedObjectLayer != null &&
         (_clientSideSecurity.HasValue && _clientSideSecurity.Value != ClientSideSecurity.UIlevel)){
         var securityRuleProvider = new SecurityRuleProvider(XPDictionary,securedObjectLayer.CreateSelectDataSecurity());
         var currentObjectLayer = new SecuredSessionObjectLayer(_allowICommandChannelDoWithSecurityContext, uow,true, null, securityRuleProvider, null);
         return new XpandUnitOfWork(currentObjectLayer, uow);
     }
     return uow;
 }