Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKE Adds option to allow browser by permissions #5762

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -533,4 +533,10 @@
<data name="HostUploadFolderLabelForImg.Text" xml:space="preserve">
<value>Default Upload Folder for images for all portals (overrides setting below)</value>
</data>
<data name="BrowAllowFollowPerms.Text" xml:space="preserve">
<value>Allow users with folder permissions</value>
</data>
<data name="lblBrowAllowFollowPerms.Text" xml:space="preserve">
<value>Allow folder users</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@
<asp:ListItem Text="Easy Image Upload" Value="easyimage"></asp:ListItem>
</asp:dropdownlist>
</div>
<div class="dnnFormItem">
<asp:label id="lblBrowAllowFollowPerms" runat="server" CssClass="dnnLabel">Allow folder users</asp:label>
<asp:CheckBox ID="BrowAllowFollowPerms" runat="server" Checked="true" resourcekey="BrowAllowFollowPerms" Text="Allow users with folder permissions"></asp:CheckBox>
</div>
<div class="dnnFormItem">
<asp:label id="lblBrowAllow" runat="server" CssClass="dnnLabel">File Browser Security</asp:label>
<asp:CheckBoxList ID="chblBrowsGr" runat="server"></asp:CheckBoxList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,8 @@ var codeMirrorInfo in
this.ConfigUrl.Url = this.ReFormatURL(importedSettings.Config.CustomConfig);
}

this.BrowAllowFollowPerms.Checked = importedSettings.BrowserAllowFollowFolderPerms;

if (!string.IsNullOrEmpty(importedSettings.BrowserRoles))
{
string sRoles = importedSettings.BrowserRoles;
Expand Down Expand Up @@ -2435,6 +2437,8 @@ var codeMirrorInfo in
moduleController.UpdateModuleSetting(this.ModuleId, $"{key}{SettingConstants.HEIGHT}", this.txtWidth.Text);
}

moduleController.UpdateModuleSetting(this.ModuleId, $"{key}{SettingConstants.BROWSERALLOWFOLLOWFOLDERPERMS}", this.BrowAllowFollowPerms.Checked.ToString());

moduleController.UpdateModuleSetting(this.ModuleId, $"{key}{SettingConstants.BLANKTEXT}", this.txtBlanktext.Text);
moduleController.UpdateModuleSetting(this.ModuleId, $"{key}{SettingConstants.CSS}", this.CssUrl.Url);
moduleController.UpdateModuleSetting(this.ModuleId, $"{key}{SettingConstants.TEMPLATEFILES}", this.TemplUrl.Url);
Expand Down Expand Up @@ -2691,7 +2695,7 @@ private void SaveSettingsByKey(string key)
EditorController.AddOrUpdateEditorHostSetting($"{key}{SettingConstants.RESIZEHEIGHT}", this.txtResizeHeight.Text);
}

EditorController.AddOrUpdateEditorHostSetting($"{key}injectjs", this.InjectSyntaxJs.Checked.ToString());
EditorController.AddOrUpdateEditorHostSetting($"{key}{SettingConstants.INJECTJS}", this.InjectSyntaxJs.Checked.ToString());

if (Utility.IsUnit(this.txtWidth.Text))
{
Expand All @@ -2709,6 +2713,8 @@ private void SaveSettingsByKey(string key)
EditorController.AddOrUpdateEditorHostSetting($"{key}{SettingConstants.CUSTOMJSFILE}", this.CustomJsFile.Url);
EditorController.AddOrUpdateEditorHostSetting($"{key}{SettingConstants.CONFIG}", this.ConfigUrl.Url);

EditorController.AddOrUpdateEditorHostSetting($"{key}{SettingConstants.BROWSERALLOWFOLLOWFOLDERPERMS}", this.BrowAllowFollowPerms.Checked.ToString());

var sRoles = this.chblBrowsGr.Items.Cast<ListItem>()
.Where(item => item.Selected)
.Aggregate(string.Empty, (current, item) => current + (item.Value + ";"));
Expand Down
Loading