public ProjectAdminConfigModel GetConfigModel()
        {
            ProjectAdminConfigModel model = new ProjectAdminConfigModel();

            GlobalConfigurationWidgetData <ProjectAdminConfigModel> data = GeminiContext.GlobalConfigurationWidgetStore.Get <ProjectAdminConfigModel>(AppGuid);

            if (data != null && data.Value != null && data.Value.Data != null)
            {
                var item = data.Value.Data;

                if (item != null)
                {
                    model.Data = item;
                }
            }
            var projectGroups = Cache.ProjectGroups.GetAll();

            var groups = projectGroups.Where(g => g.Id != Countersoft.Gemini.Commons.Constants.GlobalGroupEveryone &&
                                             g.Id != Countersoft.Gemini.Commons.Constants.GlobalGroupEveryoneAuthenticated &&
                                             g.Id != Countersoft.Gemini.Commons.Constants.GlobalGroupAdministrators);

            var excludeUserGroups = projectGroups.Where(g => g.Id != Countersoft.Gemini.Commons.Constants.GlobalGroupEveryone &&
                                                        g.Id != Countersoft.Gemini.Commons.Constants.GlobalGroupEveryoneAuthenticated);

            model.Groups     = new MultiSelectList(groups, "Id", "Name", model.Data.ExcludeGroups);
            model.UserGroups = new MultiSelectList(excludeUserGroups, "Id", "Name", model.Data.ExcludeUserFromGroups);

            return(model);
        }
        public override WidgetResult Configuration()
        {
            var result = new WidgetResult()
            {
                Success = true
            };

            ProjectAdminConfigModel model = GetConfigModel();

            result.Markup = new WidgetMarkup("views/settings.cshtml", model);

            return(result);
        }