Skip to content

Commit

Permalink
Add new setting in SecurityConfig - AuthorizeAdminMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
support committed Oct 8, 2023
1 parent 4abe259 commit cbec431
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/Core/Grand.Infrastructure/Configuration/SecurityConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,10 @@ public class SecurityConfig
/// When enabled, allowing Razor files to be updated if they're edited.
/// </summary>
public bool EnableRuntimeCompilation { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to verify access to a specific controller and action in the admin panel using menu configuration.
/// </summary>
public bool AuthorizeAdminMenu { get; set; }
}
}
5 changes: 4 additions & 1 deletion src/Web/Grand.Web.Admin/App_Data/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@
//CookieSecurePolicy.Always always sets the Secure flag
//Always setting the Secure flag is the most restrictive and most secure option.
//This is the one you should be targeting if your production environment fully runs on HTTPS
"CookieSecurePolicyAlways": false
"CookieSecurePolicyAlways": false,

//Enabling this setting allows for verification of access to a specific controller and action in the admin panel using menu configuration.
"AuthorizeAdminMenu": false
},

"Extensions": {
Expand Down
11 changes: 7 additions & 4 deletions src/Web/Grand.Web/App_Data/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@
//CookieSecurePolicy.Always always sets the Secure flag
//Always setting the Secure flag is the most restrictive and most secure option.
//This is the one you should be targeting if your production environment fully runs on HTTPS
"CookieSecurePolicyAlways": false
"CookieSecurePolicyAlways": false,

//Enabling this setting allows for verification of access to a specific controller and action in the admin panel using menu configuration.
"AuthorizeAdminMenu": false
},
"Cache": {
//Gets or sets a value indicating for default cache time in minutes"
Expand Down Expand Up @@ -137,13 +140,13 @@
"DisplayMiniProfilerInPublicStore": false,

//Indicates whether to ignore InstallUrlMiddleware
"IgnoreInstallUrlMiddleware": false,
"IgnoreInstallUrlMiddleware": true,

//Indicates whether to ignore DbVersionCheckMiddleware
"IgnoreDbVersionCheckMiddleware": false,
"IgnoreDbVersionCheckMiddleware": true,

//Indicates whether to ignore UsePoweredByMiddleware
"IgnoreUsePoweredByMiddleware": false
"IgnoreUsePoweredByMiddleware": true

},

Expand Down

0 comments on commit cbec431

Please sign in to comment.