mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Hiding the "Install themes" based on permission
This commit is contained in:
@@ -71,7 +71,10 @@ namespace Orchard.Themes.Controllers {
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public ActionResult Index() {
|
||||
bool installThemes = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null;
|
||||
bool installThemes =
|
||||
_featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null
|
||||
&& Services.Authorizer.Authorize(StandardPermissions.SiteOwner) // only site owners
|
||||
&& _shellSettings.Name == ShellSettings.DefaultName; // of the default tenant
|
||||
|
||||
var featuresThatNeedUpdate = _dataMigrationManager.GetFeaturesThatNeedUpdate();
|
||||
|
||||
|
Reference in New Issue
Block a user