Esempio n. 1
0
        public async Task <ActionResult> Delete(int id)
        {
            var workspace = await _workspaceService.Delete(id);

            Log("deleted", workspace);

            await _hub.Clients.Group(workspace.GlobalId).TopoEvent(new BroadcastEvent <Workspace>(User, "TOPO.DELETED", workspace));

            return(Ok());
        }
Esempio n. 2
0
        public IActionResult DeleteWorkspace(int workspaceId)
        {
            int userId = GetUserID();

            ViewBag.UserId = userId;
            var workspace = _workspaceService.GetAll(userId).FirstOrDefault(x => x.Id == workspaceId);

            if (workspace != null)
            {
                _workspaceService.Delete(workspace.Id);
            }
            return(Json(Url.Action("Settings", "Home")));
        }
Esempio n. 3
0
        public async Task <ActionResult> DeleteWorkspace(string id)
        {
            AuthorizeAny(
                () => Actor.IsAdmin,
                () => _svc.CanManage(id, Actor.Id).Result
                );

            var workspace = await _svc.Delete(id);

            Log("deleted", workspace);

            await Hub.Clients
            .Group(workspace.Id)
            .TopoEvent(new BroadcastEvent <Workspace>(User, "TOPO.DELETED", workspace));

            return(Ok());
        }
 public void OS_FileDelete(string file)
 {
     workspace.Delete(WorkspacePath.Parse(file));
 }