Esempio n. 1
0
        private void UpdateSecuritySetting(string securitygroup)
        {
            // maybe be able to make this more general purpose
            Edit.Utilities.DataIO secdata = new Profiles.Edit.Utilities.DataIO();

            if (!"0".Equals(securitygroup))
            {
                Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
                if (this.PredicateURI.Equals("http://profiles.catalyst.harvard.edu/ontology/prns#hasGroupSettings"))
                {
                    data.UpdateGroupSecurity(this.Subject, Convert.ToInt32(securitygroup));
                }
                else if (this.PredicateURI.Equals("http://profiles.catalyst.harvard.edu/ontology/prns#emailEncrypted"))
                {
                    if (Convert.ToInt32(securitygroup) >= -10 && Convert.ToInt32(securitygroup) < 0)
                    {
                        data.UpdateSecuritySetting(this.Subject, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), -20);
                    }
                    else
                    {
                        data.UpdateSecuritySetting(this.Subject, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), Convert.ToInt32(securitygroup));
                    }
                }

                data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup));

                divHidden.Visible = false;
            }
            Framework.Utilities.Cache.AlterDependency(this.Subject.ToString());
        }
 private void UpdateSecuritySetting(string securitygroup)
 {
     Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
     if (this.PredicateURI.Equals("http://profiles.catalyst.harvard.edu/ontology/prns#hasGroupSettings"))
     {
         data.UpdateGroupSecurity(this.Subject, Convert.ToInt32(securitygroup));
     }
     else
     {
         data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup));
     }
 }