Exemple #1
0
        public ActionResult FeatureAssignment()
        {
            FeatureAssignmentModel fam = new FeatureAssignmentModel();
            AuthenticationsAndAuthorizationsOperations aNaOps = new AuthenticationsAndAuthorizationsOperations();

            fam.accessProfile = aNaOps.GetAllFeatureAccessProfileModel();

            List <System.Web.Mvc.SelectListItem> DropdownUser = new List <SelectListItem>();

            foreach (MembershipUser user in Membership.GetAllUsers())
            {
                DropdownUser.Add(new SelectListItem {
                    Text = user.UserName, Value = user.UserName
                });
            }
            fam.DropdownUser = DropdownUser;
            List <System.Web.Mvc.SelectListItem> DropdownRole = new List <SelectListItem>();

            foreach (String role in Roles.GetAllRoles())
            {
                DropdownRole.Add(new SelectListItem {
                    Text = role, Value = role
                });
            }
            fam.DropdownRole = DropdownRole;
            List <System.Web.Mvc.SelectListItem> DropdownFeature = new List <SelectListItem>();

            foreach (FeatureProfile fp in aNaOps.GetALLRegisteredFeatures())
            {
                DropdownFeature.Add(new SelectListItem {
                    Text = fp.FeatureName, Value = fp.FeatureName
                });
            }
            fam.DropdownFeature = DropdownFeature;

            return(View(fam));
        }
Exemple #2
0
        private List <FeatureProfile> ReturnAllFeatureProfile()
        {
            AuthenticationsAndAuthorizationsOperations aNaOps = new AuthenticationsAndAuthorizationsOperations();

            return(aNaOps.GetALLRegisteredFeatures());
        }