public bool SetFeaturePublicity(long featureId, bool value)
        {
            FeatureManager featureManager = new FeatureManager();
            PermissionManager permissionManager = new PermissionManager();
            SubjectManager subjectManager = new SubjectManager();

            Feature feature = featureManager.GetFeatureById(featureId);

            if (feature != null)
            {
                if (value)
                {
                    permissionManager.CreateFeaturePermission(subjectManager.GetGroupByName("everyone").Id, feature.Id);
                }
                else
                {
                    permissionManager.DeleteFeaturePermission(subjectManager.GetGroupByName("everyone").Id, feature.Id);
                }

                return true;
            }

            return false;
        }
        public ActionResult Subjects_Select(long id)
        {
            FeatureManager featureManager = new FeatureManager();

            // DATA
            Feature feature = featureManager.GetFeatureById(id);

            List<FeaturePermissionGridRowModel> featurePermissions = new List<FeaturePermissionGridRowModel>();

            if (feature != null)
            {
                PermissionManager permissionManager = new PermissionManager();
                SubjectManager subjectManager = new SubjectManager();

                IQueryable<Subject> data = subjectManager.GetAllSubjects();

                data.ToList().ForEach(s => featurePermissions.Add(FeaturePermissionGridRowModel.Convert(s, feature, permissionManager.GetFeaturePermissionType(s.Id, feature.Id), permissionManager.HasSubjectFeatureAccess(s.Id, feature.Id))));
            }

            return View(new GridModel<FeaturePermissionGridRowModel> { Data = featurePermissions });
        }