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 UpdateVisibility() { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); int securitygroup = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode(this.PredicateURI), securitygroup); if (securitygroup >= -10 && securitygroup < 0) { data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), -20); } else { data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), securitygroup); } }
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)); } }
private void UpdateSecuritySetting(string securitygroup) { // maybe be able to make this more general purpose if (this.PredicateURI.StartsWith(Profiles.ORNG.Utilities.OpenSocialManager.ORNG_ONTOLOGY_PREFIX)) { Profiles.ORNG.Utilities.DataIO data = new Profiles.ORNG.Utilities.DataIO(); if ("0".Equals(securitygroup)) { data.RemovePersonalGadget(this.Subject, this.PredicateURI); } else { data.AddPersonalGadget(this.Subject, this.PredicateURI); } } else if (!"0".Equals(securitygroup)) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup)); } //Framework.Utilities.Cache.AlterDependency(this.Subject.ToString()); }