/// <summary> /// Gets the sync policy for the current ifolder. /// </summary> /// <param name="policy">ifolder policy.</param> public void GetSyncPolicy(iFolderPolicy policy) { EffectiveInterval = policy.SyncIntervalEffective; Enabled.Checked = LimitValue.Enabled = (policy.SyncInterval > 0); if (Enabled.Checked) { int syncInterval = policy.SyncInterval / 60; LimitValue.Text = syncInterval.ToString(); } else { LimitValue.Text = String.Empty; } if ((policy.SyncIntervalEffective > 0) || (policy.SyncInterval > 0)) { int syncInterval = policy.SyncIntervalEffective / 60; EffectiveValue.Text = syncInterval.ToString(); EffectiveUnits.Text = GetString("MINUTES"); } else { EffectiveValue.Text = GetString("UNLIMITED"); EffectiveUnits.Text = String.Empty; } }
/// <summary> /// Bind the Data to the Page. /// </summary> private void BindPolicyData() { // table DataTable policyTable = new DataTable(); policyTable.Columns.Add("Label"); policyTable.Columns.Add("Value"); try { // ifolder iFolderPolicy policy = web.GetiFolderPolicy(ifolderID); // rights //PolicyActions.Visible = (ifolder.Rights == Rights.Admin); PolicyActions.Visible = false; policyTable.Rows.Add(new object[] { GetString("SYNCINTERVAL"), policy.SyncIntervalEffective }); } catch (SoapException ex) { if (!HandleException(ex)) { throw; } } // data grid PolicyData.DataSource = policyTable; PolicyData.DataBind(); }
/// <summary> /// Gets the disk quota policy for the current ifolder. /// </summary> /// <param name="policy">iFolder policy object</param> public void GetDiskSpacePolicy(iFolderPolicy policy) { EffectiveSpace = policy.SpaceLimitEffective; Enabled.Checked = LimitValue.Enabled = (policy.SpaceLimit >= 0); UsedValue.Text = Utils.ConvertToMBString(policy.SpaceUsed, false, rm); UsedUnits.Text = GetString("MB"); LimitValue.Text = Enabled.Checked ? Utils.ConvertToMBString(policy.SpaceLimit, false, rm) : String.Empty; if ((policy.SpaceLimitEffective >= 0) || (policy.SpaceLimit >= 0)) { AvailableValue.Text = Utils.ConvertToMBString(policy.SpaceAvailable, false, rm); AvailableUnits.Text = GetString("MB"); EffectiveValue.Text = Utils.ConvertToMBString(policy.SpaceLimitEffective, false, rm); EffectiveUnits.Text = GetString("MB"); } else { AvailableValue.Text = GetString("UNLIMITED"); AvailableUnits.Text = String.Empty; EffectiveValue.Text = GetString("UNLIMITED"); EffectiveUnits.Text = String.Empty; } }
/// <summary> /// Gets the ifolder policies. /// </summary> public void GetiFolderPolicies() { iFolderPolicy policy = null; string ifolderLocation = web.GetiFolderLocation(PolicyID); string AdminID = Session["UserID"] as String; if (ifolderLocation != null) { UriBuilder remoteurl = new UriBuilder(ifolderLocation); remoteurl.Path = (new Uri(web.Url)).PathAndQuery; remoteweb.Url = remoteurl.Uri.ToString(); } try { policy = remoteweb.GetiFolderPolicy(PolicyID, AdminID); } catch { return; } AccountEnabled.GetAccountPolicy(policy); iFolderEnabled.GetiFolderEnabledPolicy(policy); iFolderLimit.GetiFolderLimitPolicy(policy); DiskQuota.GetDiskSpacePolicy(policy); SecurityState.GetEncryptionPolicy(policy); FileSize.GetFileSizePolicy(policy); FileType.GetFileTypePolicy(policy); SyncInterval.GetSyncPolicy(policy); Sharing.GetSharingPolicy(policy, PolicyID); // web.Url = currentURL; DisablePolicyEditBasedOnRighs(policy.AdminGroupRights); }
/// <summary> /// Creates a stateful list of file type filters. /// </summary> /// <param name="policy">iFolder policy object</param> /// <returns>A hashtable containing the file type filters.</returns> private Hashtable CreateFileTypeSource(iFolderPolicy policy) { // Keep the state in a hashtable. Hashtable ht = new Hashtable(); UserGroupAdminRights uRights = new UserGroupAdminRights(policy.AdminGroupRights); foreach (string s in policy.FileTypesExcludesEffective) { ht[s] = new FileTypeInfo( s, Utils.ConvertFromRegEx(s), IsAllowed(policy.FileTypesIncludesEffective, s), false); } foreach (string s in policy.FileTypesExcludes) { ht[s] = new FileTypeInfo( s, Utils.ConvertFromRegEx(s), false, uRights.AddToExcludePolicyAllowed); } return(ht); }
/// <summary> /// Event handler that gets called when the apply policy button for an ifolder is clicked. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ApplyiFolderPolicy(Object sender, EventArgs e) { string ifolderLocation = web.GetiFolderLocation(PolicyID); if (ifolderLocation != null) { UriBuilder remoteurl = new UriBuilder(ifolderLocation); remoteurl.Path = (new Uri(web.Url)).PathAndQuery; remoteweb.Url = remoteurl.Uri.ToString(); } // Get the current policy settings. iFolderPolicy policy = remoteweb.GetiFolderPolicy(PolicyID, null); try { iFolderEnabled.SetiFolderEnabledPolicy(policy); DiskQuota.SetDiskSpacePolicy(policy); FileSize.SetFileSizePolicy(policy); FileType.SetFileTypePolicy(policy); SyncInterval.SetSyncPolicy(policy); Sharing.SetSharingPolicy(policy, PolicyID); } catch (ArgumentException ex) { if (PolicyError != null) { PolicyError(this, new PolicyErrorArgs(ex)); } // web.Url = currentURL; return; } // Verify and apply all the ifolder specified settings to the policy object. // Set the new policies and refresh the view. try { remoteweb.SetiFolderPolicy(policy); } catch (Exception ex) { string errMsg = String.Format(GetString("ERRORCANNOTSETIFOLDERPOLICY"), PolicyID); if (PolicyError != null) { PolicyError(this, new PolicyErrorArgs(errMsg, ex)); } // web.Url = currentURL; return; } GetiFolderPolicies(); EnablePolicyButtons = false; web.Url = currentURL; }
/// <summary> /// Gets an ifolder policy object that is set-able. /// </summary> /// <param name="ifolderID"></param> /// <returns></returns> private iFolderPolicy GetiFolderPolicyObject(string ifolderID) { iFolderPolicy policy = new iFolderPolicy(); policy.iFolderID = ifolderID; policy.FileSizeLimit = policy.SpaceLimit = policy.SyncInterval = -1; policy.FileTypesExcludes = policy.FileTypesIncludes = null; policy.Locked = false; return(policy); }
/// <summary> /// Sets the file size policy for this ifolder. /// </summary> /// <param name="policy">iFolder policy that the new file size filter will be set.</param> public void SetFileSizePolicy(iFolderPolicy policy) { // Verify that the file size value is valid. if (Enabled.Checked) { string limitString = LimitValue.Text; if ((limitString != null) && (limitString != String.Empty)) { try { decimal limit = Convert.ToDecimal(limitString); if (limit >= 1) { // Convert megabytes to bytes. long filelimit = Convert.ToInt64(Decimal.Round(limit, 2) * 1048576); if (policy.SpaceLimit > 0) { if (filelimit >= policy.SpaceLimit) { throw new ArgumentException(GetString("ERRORINVALIDLIMIT")); } else { policy.FileSizeLimit = filelimit; } } else { policy.FileSizeLimit = filelimit; } } else { throw new ArgumentException(GetString("ERRORINVALIDFILESIZE")); } } catch (FormatException) { throw new ArgumentException(GetString("ERRORINVALIDFILESIZE")); } catch (OverflowException) { throw new ArgumentException(GetString("ERRORINVALIDFILESIZE")); } } else { throw new ArgumentException(GetString("ERRORNOFILESIZE")); } } else { policy.FileSizeLimit = 0; } }
/// <summary> /// Gets the file type policy for the current ifolder. /// </summary> /// <param name="policy">iFolder policy.</param> public void GetFileTypePolicy(iFolderPolicy policy) { // Show new file type controls NewFileTypeName.Visible = AddButton.Visible = true; // Create a list from the file type policy. FileTypeSource = CreateFileTypeSource(policy); // Build the data view from the table. FileTypeList.DataSource = CreateFileTypeListView(); FileTypeList.DataBind(); SetPageButtonState(); }
/// <summary> /// Bind the Data to the Page. /// </summary> private void BindData() { long used = 0; long limit = 0; ifolderID = Request.QueryString.Get("iFolder"); if ((ifolderID != null) && (ifolderID.Length != 0)) { // ifolder iFolderPolicy policy = web.GetiFolderPolicy(ifolderID); used = policy.SpaceUsed; limit = policy.SpaceLimitEffective; Title.Text = GetString("IFOLDERQUOTA"); } else { // global try { UserPolicy policy = web.GetAuthenticatedUserPolicy(); used = policy.SpaceUsed; limit = policy.SpaceLimitEffective; Title.Text = GetString("HOMEQUOTA"); } catch (Exception e) { // Title.Text = e.Message; } } // used SpaceUsed.Text = WebUtility.FormatSize(used, rm); // limit if (limit == -1) { // no limit SpaceAvailable.Text = GetString("NOLIMIT"); } else { // limit long Available = (limit - used) >= 0 ? (limit - used) : 0; SpaceAvailable.Text = WebUtility.FormatSize(Available, rm); } }
/// <summary> /// Sets the ifolder synchronization status on all selected ifolders. /// </summary> /// <param name="syncStatus">If true then all selected ifolders will be enabled.</param> private void SetSelectediFolderStatus(bool syncStatus) { foreach (string ifolderID in CheckediFolders.Keys) { /// Check for rights... int preference = GetRightsForiFolder(ifolderID); if (preference == -1) { preference = 0xffff; } UserGroupAdminRights rights = new UserGroupAdminRights((int)preference); if (!rights.EnableDisableiFolderAllowed) { continue; } // Don't set the status if already set. if (CheckediFolders[ifolderID] as string != syncStatus.ToString()) { iFolderPolicy policy = Utils.GetiFolderPolicyObject(ifolderID); policy.Locked = syncStatus; string ifolderLocation = web.GetiFolderLocation(ifolderID); UriBuilder remoteurl = new UriBuilder(ifolderLocation); remoteurl.Path = (new Uri(web.Url)).PathAndQuery; web.Url = remoteurl.Uri.ToString(); try { web.SetiFolderPolicy(policy); } catch (Exception ex) { TopNav.ShowError(GetString("ERRORCANNOTSETIFOLDERSTATUS"), ex); web.Url = currentServerURL; return; } } } // Clear the checked members. CheckediFolders.Clear(); AlliFoldersCheckBox.Checked = false; // Set the action buttons. SetActionButtons(); web.Url = currentServerURL; // Rebind the data source with the new data. GetiFolders(); }
/// <summary> /// Sets the file type policy for this ifolder. /// </summary> /// <param name="policy">iFolder policy that the new file type filter will be set.</param> public void SetFileTypePolicy(iFolderPolicy policy) { // Build a list of checked file types. ArrayList filterList = new ArrayList(); foreach (FileTypeInfo fti in FileTypeSource.Values) { if (fti.IsEnabled && !fti.IsAllowed) { filterList.Add(fti.RegExFileName); } } // Set the current ifolder policy. policy.FileTypesExcludes = filterList.ToArray(typeof(string)) as string[]; }
/// <summary> /// Sets the policy for the user. /// </summary> /// <param name="policy">iFolder policy where the information will be set.</param> public void SetSharingPolicy(iFolderPolicy policy, string PolicyID) { int SharingStatus = 0; int iFolderStatus = policy.SharingStatus; string valuechanged = Session["ValueChanged"] as string; if (valuechanged.Equals("true")) { if (SharingOn.Checked) { SharingStatus += (int)Share.Sharing; //1; } else { SharingStatus += (int)Share.DisableSharing; //8 } } else { SharingStatus = iFolderStatus; } policy.SharingStatus = SharingStatus; if (disablePastSharing.Checked) { /// pass the iFolder ID string ifolderLocation = web.GetiFolderLocation(PolicyID); if (ifolderLocation != null) { UriBuilder remoteurl = new UriBuilder(ifolderLocation); remoteurl.Path = (new Uri(web.Url)).PathAndQuery; remoteweb.Url = remoteurl.Uri.ToString(); } try { remoteweb.DisableiFolderPastSharing(PolicyID); } catch (Exception ex) { throw ex; } disablePastSharing.Checked = false; } }
/// <summary> /// Gets the file size policy for the current ifolder. /// </summary> /// <param name="policy">iFolder policy</param> public void GetFileSizePolicy(iFolderPolicy policy) { EffectiveLimit = policy.FileSizeLimitEffective; Enabled.Checked = LimitValue.Enabled = (policy.FileSizeLimit > 0); LimitValue.Text = (Enabled.Checked) ? Utils.ConvertToMBString(policy.FileSizeLimit, false, rm) : String.Empty; if ((policy.FileSizeLimitEffective > 0) || (policy.FileSizeLimit > 0)) { EffectiveValue.Text = Utils.ConvertToMBString(policy.FileSizeLimitEffective, false, rm); EffectiveUnits.Text = GetString("MB"); } else { EffectiveValue.Text = GetString("UNLIMITED"); EffectiveUnits.Text = String.Empty; } }
/// <summary> /// Sets the policy for the user. /// </summary> /// <param name="policy">iFolder policy where the information will be set.</param> public void SetDisableSharingPolicy(iFolderPolicy policy, string PolicyID) { int DisableSharingStatus = 0; iFolder ifolder = web.GetiFolder(PolicyID); string OwnerID = ifolder.OwnerID; SystemPolicy systemPolicy = web.GetSystemPolicy(); UserPolicy userPolicy = web.GetUserPolicy(OwnerID); int iFolderDisableStatus = policy.DisableSharingStatus; int UserDisableStatus = userPolicy.DisableSharingStatus; int SystemDisableStatus = systemPolicy.DisableSharingStatus; if (((iFolderDisableStatus & (int)DisableShare.EnableSharing) == (int)DisableShare.EnableSharing) && disableSharingOn.Checked == false) { /// it means for this iFolder , admin had earlier enabled the sharing on iFolderDetails page, so retain that DisableSharingStatus += (int)DisableShare.EnableSharing; //8 } else if ((((SystemDisableStatus & (int)DisableShare.DisableSharing) == (int)DisableShare.DisableSharing) || ((UserDisableStatus & (int)DisableShare.DisableSharing) == (int)DisableShare.DisableSharing) || ((iFolderDisableStatus & (int)DisableShare.DisableSharing) == (int)DisableShare.DisableSharing)) && disableSharingOn.Checked == false) { /// if for this iFolder , disable sharing was "on" (either iFolder, user or system level) , and now admin has unchecked the box , then also store enable sharing -- 8 DisableSharingStatus += (int)DisableShare.EnableSharing; //8 } if (disableSharingOn.Checked && iFolderDisableStatus != 0) { /// consider the case when no disable of sharing on iFolder level but disable past sharing is applied. DisableSharingStatus += (int)DisableShare.DisableSharing; //1; } else if (disableSharingOn.Checked && (UserDisableStatus == 0 || ((UserDisableStatus & (int)DisableShare.EnableSharing) == (int)DisableShare.EnableSharing))) { /// if on user level, it was enabled and then if on iFolder level it is disabled , then for that case DisableSharingStatus += (int)DisableShare.DisableSharing; //1; } policy.DisableSharingStatus = DisableSharingStatus; /// Next change is to remove the past sharing , if (disablePastSharing.Checked) { /// pass the iFolderID web.DisableiFolderPastSharing(PolicyID); disablePastSharing.Checked = false; } }
/// <summary> /// Sets the synchronization policy for this ifolder. /// </summary> /// <param name="policy">iFolder policy that the new sync interval will be set.</param> public void SetSyncPolicy(iFolderPolicy policy) { // Verify that the file size value is valid. if (Enabled.Checked) { string limitString = LimitValue.Text; if ((limitString != null) && (limitString != String.Empty)) { try { int limit = Convert.ToInt32(limitString); if (limit >= 5 && limit <= 999) { // Convert the interval from minutes to seconds. policy.SyncInterval = limit * 60; } else { throw new ArgumentException(GetString("ERRORINVALIDSYNCINTERVAL")); } } catch (FormatException) { throw new ArgumentException(GetString("ERRORINVALIDSYNCINTERVAL")); } catch (OverflowException) { throw new ArgumentException(GetString("ERRORINVALIDSYNCINTERVAL")); } } else { throw new ArgumentException(GetString("ERRORNOSYNCINTERVAL")); } } else { policy.SyncInterval = 0; } }
/// <summary> /// Sets the disk space policy for this ifolder. /// </summary> /// <param name="policy">iFolder policy that the new disk space quota will be set.</param> public void SetDiskSpacePolicy(iFolderPolicy policy) { // Verify that the disk space quota value is valid. if (Enabled.Checked) { string limitString = LimitValue.Text; if ((limitString != null) && (limitString != String.Empty)) { try { decimal limit = Convert.ToDecimal(limitString); if (limit >= 0) { // Convert from megabytes back to bytes. policy.SpaceLimit = Convert.ToInt64(Decimal.Round(limit, 2) * 1048576); } else { throw new ArgumentException(GetString("ERRORINVALIDQUOTA")); } } catch (FormatException) { throw new ArgumentException(GetString("ERRORINVALIDQUOTA")); } catch (OverflowException) { throw new ArgumentException(GetString("ERRORINVALIDQUOTA")); } } else { throw new ArgumentException(GetString("ERRORNOQUOTA")); } } else { policy.SpaceLimit = -1; } }
/// <summary> /// Gets the account policy for the current ifolder user. /// </summary> /// <param name="policy">iFolder policy object</param> public void GetEncryptionPolicy(iFolderPolicy policy) { EncryptNav.Visible = false; }
/// <summary> /// Gets the ifolder enabled policy for the current ifolder. /// </summary> /// <param name="policy">iFolder policy object</param> public void GetiFolderEnabledPolicy(iFolderPolicy policy) { Enabled.Checked = policy.Locked; }
/// <summary> /// Gets the Sharing policy for the current iFolder. /// </summary> /// <param name="policy">User policy object</param> public void GetSharingPolicy(iFolderPolicy policy, string PolicyID) { // compare system policy, and owner policy also to decide //to get owner ID iFolder ifolder = web.GetiFolder(PolicyID); string OwnerID = ifolder.OwnerID; SystemPolicy systemPolicy = web.GetSystemPolicy(); UserPolicy userPolicy = web.GetUserPolicy(OwnerID, null); int iFolderStatus = policy.SharingStatus; int UserStatus = userPolicy.SharingStatus; int SystemStatus = systemPolicy.SharingStatus; int GroupStatus = web.GetGroupSharingPolicy(OwnerID); /// the function will return who has higher priority : system or user or iFolder. int DerivedStatus = DeriveStatus(SystemStatus, GroupStatus, UserStatus, iFolderStatus); /// If policy was modified on iFolder level, then show it. Session["ValueChanged"] = "false"; if (iFolderStatus == 0) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; if (UserStatus != 0) { if ((UserStatus & (int)Share.Sharing) == (int)Share.Sharing || UserStatus == 0) { SharingOn.Checked = true; disablePastSharing.Enabled = false; } else { SharingOn.Checked = false; disablePastSharing.Enabled = true; } } else if (GroupStatus != 0) { if ((GroupStatus & (int)Share.Sharing) == (int)Share.Sharing || GroupStatus == 0) { SharingOn.Checked = true; disablePastSharing.Enabled = false; } else { SharingOn.Checked = false; disablePastSharing.Enabled = true; } } else { if ((SystemStatus & (int)Share.Sharing) == (int)Share.Sharing || SystemStatus == 0) { SharingOn.Checked = true; disablePastSharing.Enabled = false; } else { SharingOn.Checked = false; disablePastSharing.Enabled = true; } } } else { if ((iFolderStatus & (int)Share.Sharing) == (int)Share.Sharing) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; if ((iFolderStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { //disableSharingOn.Checked = true; SharingOn.Enabled = false; //enforcedDisableSharing.Enabled = true; enforcedSharing.Checked = true; } } else if ((iFolderStatus & (int)Share.DisableSharing) == (int)Share.DisableSharing) { SharingOn.Checked = false; enforcedSharing.Enabled = true; disablePastSharing.Enabled = true; if ((iFolderStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { SharingOn.Enabled = false; //enforcedDisableSharing.Enabled = true; enforcedSharing.Checked = true; } } } // Either there was no iFolder level policy, or user level has enforced its policy. if (DerivedStatus == (int)HigherPriority.User) { /// There was not any iFolder level policy but user level policy is there so show that. if (UserStatus == (int)Share.Sharing || UserStatus == 0) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; } else { if ((UserStatus & (int)Share.Sharing) == (int)Share.Sharing) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; if ((UserStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { //disableSharingOn.Checked = true; //enforcedDisableSharing.Checked = true; //system has higher priority , so disable the check boxes SharingOn.Enabled = enforcedSharing.Enabled = false; } } else if ((UserStatus & (int)Share.DisableSharing) == (int)Share.DisableSharing) { SharingOn.Checked = false; enforcedSharing.Enabled = true; disablePastSharing.Enabled = true; if ((UserStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { //disableSharingOn.Checked = true; //enforcedDisableSharing.Checked = true; //system has higher priority , so disable the check boxes SharingOn.Enabled = enforcedSharing.Enabled = false; } } } } // Either there was no iFolder level policy, or Group level has enforced its policy. if (DerivedStatus == (int)HigherPriority.Group) { /// There was not any iFolder level policy but group level policy is there so show that. if (GroupStatus == (int)Share.Sharing || UserStatus == 0) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; } else { if ((GroupStatus & (int)Share.Sharing) == (int)Share.Sharing) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; if ((GroupStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { //disableSharingOn.Checked = true; //enforcedDisableSharing.Checked = true; //Group has higher priority , so disable the check boxes SharingOn.Enabled = enforcedSharing.Enabled = false; } } else if ((GroupStatus & (int)Share.DisableSharing) == (int)Share.DisableSharing) { SharingOn.Checked = false; enforcedSharing.Enabled = true; disablePastSharing.Enabled = true; if ((GroupStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { //disableSharingOn.Checked = true; //enforcedDisableSharing.Checked = true; //group has higher priority , so disable the check boxes SharingOn.Enabled = enforcedSharing.Enabled = false; } } } } if (DerivedStatus == (int)HigherPriority.System) { /// There was not any iFolder level policy but system level policy is there so show that. if (SystemStatus == (int)Share.Sharing || SystemStatus == 0) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; } else { if ((SystemStatus & (int)Share.Sharing) == (int)Share.Sharing) { SharingOn.Checked = true; enforcedSharing.Enabled = true; disablePastSharing.Enabled = false; if ((SystemStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { //disableSharingOn.Checked = true; //enforcedDisableSharing.Checked = true; //system has higher priority , so disable the check boxes SharingOn.Enabled = enforcedSharing.Enabled = false; } } else if ((SystemStatus & (int)Share.DisableSharing) == (int)Share.DisableSharing) { SharingOn.Checked = false; enforcedSharing.Enabled = true; disablePastSharing.Enabled = true; if ((SystemStatus & (int)Share.EnforcedSharing) == (int)Share.EnforcedSharing) { //disableSharingOn.Checked = true; //enforcedDisableSharing.Checked = true; //system has higher priority , so disable the check boxes SharingOn.Enabled = enforcedSharing.Enabled = false; } } } } // There is no requirement of enforce check box on iFolder level, so make it invisible enforcedSharing.Visible = false; }
/// <summary> /// Sets the ifolder enabled policy for the ifolder. /// </summary> /// <param name="policy">iFolder policy where the synchronization information will be set.</param> public void SetiFolderEnabledPolicy(iFolderPolicy policy) { policy.Locked = Enabled.Checked; }
/// <summary> /// Gets the ifolder Limit policy for the current ifolder. /// </summary> /// <param name="policy">iFolder policy object</param> public void GetiFolderLimitPolicy(iFolderPolicy policy) { iFolderLimitNav.Visible = false; }
/// <summary> /// Gets the account policy for the current ifolder user. /// </summary> /// <param name="policy">iFolder policy object</param> public void GetAccountPolicy(iFolderPolicy policy) { AccountNav.Visible = false; }