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))); }
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)); }
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)); }
public void SetAppId(int?appId) => BlockEditorBase.GetEditor(Block).SetAppId(appId);
public void SetAppId(int?appId) { BlockEditorBase.GetEditor(_block).SetAppId(appId); }
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)); }