/// <summary> /// 不允许被外部调用 /// </summary> public AtawApplicationConfig() { // string myConn = ConfigurationManager.AppSettings["sqlConnectionString"].ToString(); //string basePath = // Databases = new RegNameList<DatabaseConfigItem>(); AppSettings = new RegNameList <KeyValueItem>(); }
public static RightFilterType RightVerification(string expressString, RegNameList <FunRightItem> FunResultItems) { List <string> menus = new List <string>(); List <FunRightItem> menuFuns = new List <FunRightItem>(); FormartString(expressString, menuFuns, menus); if (menus == null || menus.Count == 0) { return(RightFilterType.Success); } //只验证登陆 var builder = AtawAppContext.Current.AtawRightBuilder.Value; //firstNoMatch 第一个不匹配,isMath 是否都不匹配 0都不匹配,1至少有一个匹配 for (int i = 0, firstNoMatch = 0, isMatch = 0; i < menus.Count; i++) { string menu = menus[i]; var status = builder.MenuRightCheck(menu); if (status == 1) { var items = builder.CreateFunRight(menu); FunResultItems.AddRange(items); isMatch = 1; } if (status != 1 && firstNoMatch == 0) { firstNoMatch = status; } if (i == menus.Count - 1 && isMatch == 0) { if (firstNoMatch == -1) { return(RightFilterType.UnRenew); } else if (firstNoMatch == -2) { return(RightFilterType.DenyPermission); } } } //判断功能权限 for (int i = 0; i < menuFuns.Count; i++) { var item = FunResultItems[menuFuns[i].RegName.ToUpper()]; if (item != null && item.IsAllow) { return(RightFilterType.Success); } if (i == menuFuns.Count - 1) { return(RightFilterType.DenyPermission); } } return(RightFilterType.Success); }
public AtawConfigInfo() { // Databases = new RegNameList<DatabaseConfigItem>(); ControlUnits = new RegNameList <ControlUnitItemInfo>(); BaseConfigs = new RegNameList <BaseConfigItemInfo>(); }
public ThemeListConfig() { ThemeLists = new RegNameList <ThemeListConfigItem>(); }
public MvcConfigInfo() { DataRoutes = new RegNameList <RoutesInfo>(); }
public DbCodeTableXml() { DbCodeTables = new RegNameList <DbCodeTable>(); }
private AtawIocContext() { MainContainer = new UnityContainer(); PlugInModelList = new RegNameList <PlugInModel>(); }
public DataDictXml() { DataDicts = new RegNameList <DataDict>(); }
public DBConfig() { Databases = new RegNameList <DatabaseConfigItem>(); }
public DataDict() { DDItems = new RegNameList <KeyValueItem>(); }