mirror of https://github.com/abpframework/abp.git
1 changed files with 28 additions and 0 deletions
@ -0,0 +1,28 @@ |
|||||
|
using JetBrains.Annotations; |
||||
|
using Volo.Abp.GlobalFeatures; |
||||
|
|
||||
|
namespace Volo.CmsKit.GlobalFeatures; |
||||
|
|
||||
|
[GlobalFeatureName(Name)] |
||||
|
public class ContentsFeature : GlobalFeature |
||||
|
{ |
||||
|
public const string Name = "CmsKit.Contents"; |
||||
|
|
||||
|
internal ContentsFeature( |
||||
|
[NotNull] GlobalCmsKitFeatures cmsKit |
||||
|
) : base(cmsKit) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public override void Enable() |
||||
|
{ |
||||
|
var userFeature = FeatureManager.Modules.CmsKit().User; |
||||
|
if (!userFeature.IsEnabled) |
||||
|
{ |
||||
|
userFeature.Enable(); |
||||
|
} |
||||
|
|
||||
|
base.Enable(); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue