private void Edit_Privacy(string PageIndexID) { Security.Pages.PrivacyMgr myPrivacyMgr = new Security.Pages.PrivacyMgr(); // Page Index e2Data[] UpdateData_PrivacyURL = { new e2Data("PageIndexID", PageIndexID), new e2Data("ReturnURL", tbx_ReturnURL.Text) }; if (myPrivacyMgr.Chk_Page_PrivacyURL(PageIndexID)) { myPrivacyMgr.Edit_Page_PrivacyURL(UpdateData_PrivacyURL); } else { myPrivacyMgr.Add_Page_PrivacyURL(UpdateData_PrivacyURL); // Add Administrator and Guest Role to Privacy // Administrator e2Data[] UpdateData_Admin = { new e2Data("PageIndexID", PageIndexID), new e2Data("UserGroupID", StringEnum.GetStringValue(Security.Users.UserGroup.Administrator)), new e2Data("Allow_View", "1"), new e2Data("Allow_Create", "1"), new e2Data("Allow_Modify", "1"), new e2Data("Allow_Delete", "1"), new e2Data("Allow_Rollback", "1"), new e2Data("Allow_ChangePermissions", "1"), new e2Data("Allow_Approve", "1"), new e2Data("Allow_Publish", "1"), new e2Data("Allow_DesignMode", "1") }; myPrivacyMgr.Add_Page_Privacy(UpdateData_Admin); // Guest e2Data[] UpdateData = { new e2Data("PageIndexID", _pageindexid), new e2Data("UserGroupID", StringEnum.GetStringValue(Security.Users.UserGroup.Guest)), new e2Data("Allow_View", "1"), new e2Data("Allow_Create", "0"), new e2Data("Allow_Modify", "0"), new e2Data("Allow_Delete", "0"), new e2Data("Allow_Rollback", "0"), new e2Data("Allow_ChangePermissions", "0"), new e2Data("Allow_Approve", "0"), new e2Data("Allow_Publish", "0"), new e2Data("Allow_DesignMode", "0") }; myPrivacyMgr.Add_Page_Privacy(UpdateData); } }
private void Remove_Privacy(string PageIndexID) { Security.Pages.PrivacyMgr myPrivacyMgr = new Security.Pages.PrivacyMgr(); if (myPrivacyMgr.Chk_Page_PrivacyURL(PageIndexID)) { myPrivacyMgr.Remove_Page_PrivacyURL(PageIndexID); myPrivacyMgr.Remove_Page_Privacies(PageIndexID); } }