예제 #1
0
        public async Task <IActionResult> CreateVersion(string provider, string id, [FromForm] string label)
        {
            var user = _userContextAccessor.GetContext();
            var page = await _pageManager.GetByIdAsync(id);

            if (!_pageSecurity.CanDesignPage(user, page))
            {
                return(this.Unauthorized());
            }

            var draft = await _pageManager.CreateDraftVersion(id, user.Name, label);

            return(Redirect($"/sys/page/{id}/design?version={draft.VersionCode}"));
        }