-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add Security Module (Lombiq Technologies: OCORE-91) #11538
Conversation
...chardCore.Tests/Modules/OrchardCore.Security/Extensions/ApplicationBuilderExtensionsTests.cs
Outdated
Show resolved
Hide resolved
@Piedone I'm almost finish |
src/OrchardCore.Modules/OrchardCore.Security/Options/PermissionsPolicyOptions.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Security/Extensions/ApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Security/Middlewares/PermissionsPolicyMiddleware.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Security/Extensions/PermissionsPolicyBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
Okay I could repro Yes the dictionaries fixed the duplicates when using multiple config sources, and it will help other features to collaborate. Then, the mixing was working when only updating settings defined from the configuration. But you're right, I could repro when changing settings that are not defined from the config. Need to leave, will be easy to fix tomorrow I think as we have a good repro ;) |
Okay the dictionaries fixed the duplicates but their are still merging values in Then, as it is done, other features will be able to collaborate but by also using a later postConfigure, or use one of the alternatives to just have to use Configure, will see. I will commit. |
Can you demo the module if you attend the OC standup, to hear the feedback or you could refer to my first video which I demo it |
src/OrchardCore.Modules/OrchardCore.Security/Extensions/OrchardCoreBuilderExtensions.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Security/Services/HeaderPolicyProvider.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Security/Services/SecurityHeadersMiddleware.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Security/ViewModels/SecuritySettingsViewModel.cs
Show resolved
Hide resolved
@jtkech anything else or shall I merge? |
As you want, I don't want to block anything, @hishamco I assume that you re-tried different use cases as I didn't take the time to do it. Maybe consider #11538 (comment) but was only suggestions. Yes, there are so many ways to mix config/settings, e.g. for tenant specific settings we pre-fill values coming from the config stack, then through the editor we can override those for which we provide a value, notice that here tenant specific settings is another config source itself ;) The other thought was, because all is done at the tenant/module level, why having an helper to be used from the app, but yes maybe useful to override settings from config for all tenants in one line. |
Thanks a lot @jtkech let us merge this, then we could think about different things to improve. Regarding your above comment, according to what I understand from Zoltan the newly introduced extension Thanks again |
What?!! why this happening? Is there an errors in the console? |
<div class="custom-control custom-checkbox"> | ||
<input type="checkbox" class="custom-control-input" asp-for="EnableSandbox" /> | ||
<label class="custom-control-label" asp-for="EnableSandbox">@T["Enable Sandbox"]</label> | ||
<span class="hint">@T["Enables a sandbox for the requested resource similar to the <iframe> sandbox attribute."]</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is why it fails. I tries to render an '<iframe>'. Also, use proper Bootstrap 5 styles for checkboxes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the <>
and now it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, use proper Bootstrap 5 styles for checkboxes.
I started this PR before bootstrap 5 stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the <> and now it works.
How's it working before?
Maybe only little tweaks to do related to the new bootstrap 5 We should have merged dev in the PR before merging it |
Seems you are right, @Skrypt let me check after finalizing the PR that i'm working on. One more this it's possible that the bootstrap PR breaks the UI at whole? |
Very unlikely. Only cosmetical changes. |
I will submit a PR as quick fix for bootstrap issue ASAP |
I will test it later tonight. The only issue that bothers me right now is the fact that I get an "almost blank" page after submitting the settings form. |
It works fine with me, I'm trying to push my PR now .. |
Fixes #854
X-Frame-Options(Obsoleted byframe-ancestor
in CSP)