Beispiel #1
0
        public Guid?SaveTemplateId(int templateId, bool forceCreateContentGroup)
        {
            var callLog = Log.Call <Guid?>($"{templateId}, {forceCreateContentGroup}");

            ThrowIfNotAllowedInApp(GrantSets.WriteSomething);
            return(callLog("ok", BlockEditorBase.GetEditor(Block).SaveTemplateId(templateId, forceCreateContentGroup)));
        }
Beispiel #2
0
 public bool Publish(string part, int index)
 {
     Log.Add($"try to publish #{index} on '{part}'");
     if (!new MultiPermissionsApp().Init(_context, _block.App, Log)
         .EnsureAll(GrantSets.WritePublished, out var error))
     {
         throw HttpException.PermissionDenied(error);
     }
     return(BlockEditorBase.GetEditor(_block).Publish(part, index));
 }
Beispiel #3
0
        public Guid?SaveTemplateId(int templateId, bool forceCreateContentGroup)
        {
            var permCheck = new MultiPermissionsApp().Init(_context, _block.App, Log);

            if (!permCheck.EnsureAll(GrantSets.WriteSomething, out var error))
            {
                throw HttpException.PermissionDenied(error);
            }

            return(BlockEditorBase.GetEditor(_block).SaveTemplateId(templateId, forceCreateContentGroup));
        }
Beispiel #4
0
 public void SetAppId(int?appId) => BlockEditorBase.GetEditor(Block).SetAppId(appId);
Beispiel #5
0
 public void SetAppId(int?appId)
 {
     BlockEditorBase.GetEditor(_block).SetAppId(appId);
 }
Beispiel #6
0
 public bool PublishPart(string part, int index)
 {
     Log.Add($"try to publish #{index} on '{part}'");
     ThrowIfNotAllowedInApp(GrantSets.WritePublished);
     return(BlockEditorBase.GetEditor(Block).Publish(part, index));
 }