Exemple #1
0
        private void AppendAccessControlRules(DbCommand command, ViewPage page, SelectClauseDictionary expressions)
        {
            object handler = _config.CreateActionHandler();

            if (!((handler is BusinessRules)))
            {
                return;
            }
            BusinessRules rules = ((BusinessRules)(handler));
            string        accessControlFilter = rules.EnumerateAccessControlRules(command, _config.ControllerName, _parameterMarker, page, expressions);

            if (String.IsNullOrEmpty(accessControlFilter))
            {
                return;
            }
            if (!(String.IsNullOrEmpty(_viewFilter)))
            {
                _viewFilter = (_viewFilter + " and ");
            }
            _viewFilter = String.Format("{0}/*Sql*/{1}/*Sql*/", _viewFilter, accessControlFilter);
        }