public bool AddGroupToFolder(string gId, string fId, MapPermissionType per) { if (_folderManeger.IsMapFolderExist(new ObjectId(fId)) && _groupManager.IsGroupExist(new ObjectId(gId)) && IsOwner(fId)) { var folder = _folderManeger.GetMapFolderById(new ObjectId(fId)); folder.Permissions.Groups[new ObjectId(gId)] = per; _folderManeger.UpdateMapFolder(folder); return(true); } return(false); }
public bool AddGroupToMap(string gId, string mapId, MapPermissionType per) { if (_mapManager.IsMapExist(new ObjectId(mapId)) && _groupManager.IsGroupExist(new ObjectId(gId)) && IsOwner(mapId)) { var map = _mapManager.GetMapById(new ObjectId(mapId)); map.Permissions.Groups[new ObjectId(gId)] = per; _mapManager.UpdateMap(map); return(true); } return(false); }