From f3943a948739612ba86ec296bd3df45f2032809f Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 30 Dec 2020 03:10:02 +0000 Subject: [PATCH] ... --- .../GoogleTranslate/GoogleTranslate.cs | 14 ++++++++++++- src/GoogleCode/GoogleTranslate/project.json | 2 +- src/OAuth.AspNet.AuthServer/Makefile | 2 +- src/OAuth.AspNet.Token/Makefile | 2 +- src/Yavsc.Abstract/Makefile | 2 +- src/Yavsc.Server/Makefile | 2 +- .../Access/CircleAuthorizationToFile.cs | 2 +- .../Streaming/LiveApiController.cs | 20 ++++++++++--------- src/Yavsc/Makefile | 2 +- src/Yavsc/Models/ApplicationDbContext.cs | 1 + src/Yavsc/Views/Home/About.cshtml | 10 ++-------- src/Yavsc/Views/Home/About.pt.cshtml | 4 ---- 12 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/GoogleCode/GoogleTranslate/GoogleTranslate.cs b/src/GoogleCode/GoogleTranslate/GoogleTranslate.cs index 9d19e9c2..e6d33fef 100644 --- a/src/GoogleCode/GoogleTranslate/GoogleTranslate.cs +++ b/src/GoogleCode/GoogleTranslate/GoogleTranslate.cs @@ -10,8 +10,20 @@ using RestSharp; using RestSharp.Deserializers; using System.Linq; + namespace GoogleTranslateNET { + public class NoSevrerSideImplementationAttribute : Attribute + { + public string Reason { get ; private set; } + public NoSevrerSideImplementationAttribute(string reason) : base() + { + Reason = reason; + } + + } + + [NoSevrerSideImplementation("none")] public class GoogleTranslate { private string _key; @@ -193,4 +205,4 @@ namespace GoogleTranslateNET return "There was an error. Unable to determine the cause."; } } -} \ No newline at end of file +} diff --git a/src/GoogleCode/GoogleTranslate/project.json b/src/GoogleCode/GoogleTranslate/project.json index 1023c65f..7d60e193 100644 --- a/src/GoogleCode/GoogleTranslate/project.json +++ b/src/GoogleCode/GoogleTranslate/project.json @@ -25,7 +25,7 @@ "defaultNamespace": "Yavsc" }, "dependencies": { - "Newtonsoft.Json": "6.0.0", + "Newtonsoft.Json": "6.0.1-beta1", "Gapi.net45": "1.0.1", "RestSharp": "103.4.0" }, diff --git a/src/OAuth.AspNet.AuthServer/Makefile b/src/OAuth.AspNet.AuthServer/Makefile index 29692eb4..d1d4d739 100644 --- a/src/OAuth.AspNet.AuthServer/Makefile +++ b/src/OAuth.AspNet.AuthServer/Makefile @@ -1,5 +1,5 @@ SOURCE_DIR=$(HOME)/workspace/yavsc -MAKEFILE_DIR=$(SOURCE_DIR)/scripts/build/make +MAKEFILE_DIR=$(SOURCE_DIR)/scripts/make include $(MAKEFILE_DIR)/dnx.mk include $(MAKEFILE_DIR)/versioning.mk diff --git a/src/OAuth.AspNet.Token/Makefile b/src/OAuth.AspNet.Token/Makefile index 63db4574..a61ccdff 100644 --- a/src/OAuth.AspNet.Token/Makefile +++ b/src/OAuth.AspNet.Token/Makefile @@ -1,5 +1,5 @@ SOURCE_DIR=$(HOME)/workspace/yavsc -MAKEFILE_DIR=$(SOURCE_DIR)/scripts/build/make +MAKEFILE_DIR=$(SOURCE_DIR)/scripts/make include $(MAKEFILE_DIR)/dnx.mk include $(MAKEFILE_DIR)/versioning.mk diff --git a/src/Yavsc.Abstract/Makefile b/src/Yavsc.Abstract/Makefile index 612c580b..5991581a 100644 --- a/src/Yavsc.Abstract/Makefile +++ b/src/Yavsc.Abstract/Makefile @@ -1,5 +1,5 @@ -MAKEFILE_DIR=../../scripts/build/make +MAKEFILE_DIR=../../scripts/make BASERESX=Resources/Yavsc.Attributes.Validation.Resources.resx \ Resources/Yavsc.Models.Messaging.Resources.resx \ Resources/Yavsc.Models.IT.Fixing.Bug.resx\ diff --git a/src/Yavsc.Server/Makefile b/src/Yavsc.Server/Makefile index 34ad1337..e7a2cdd3 100644 --- a/src/Yavsc.Server/Makefile +++ b/src/Yavsc.Server/Makefile @@ -1,5 +1,5 @@ SOURCE_DIR=$(HOME)/workspace/yavsc -MAKEFILE_DIR=$(SOURCE_DIR)/scripts/build/make +MAKEFILE_DIR=$(SOURCE_DIR)/scripts/make BASERESX=Resources/Yavsc.Models.Relationship.HyperLink.resx \ Resources/Yavsc.Models.Streaming.LiveFlow.resx BASERESXGEN=$(BASERESX:.resx=.Designer.cs) diff --git a/src/Yavsc.Server/Models/Access/CircleAuthorizationToFile.cs b/src/Yavsc.Server/Models/Access/CircleAuthorizationToFile.cs index 8eaba90d..e29ca3d6 100644 --- a/src/Yavsc.Server/Models/Access/CircleAuthorizationToFile.cs +++ b/src/Yavsc.Server/Models/Access/CircleAuthorizationToFile.cs @@ -9,7 +9,7 @@ using Yavsc.Models.Relationship; namespace Yavsc.Server.Models.Access { - [Obsolete] + [Obsolete("use rules from .access files")] public class CircleAuthorizationToFile : ICircleAuthorization { diff --git a/src/Yavsc/ApiControllers/Streaming/LiveApiController.cs b/src/Yavsc/ApiControllers/Streaming/LiveApiController.cs index eec1fade..14656551 100644 --- a/src/Yavsc/ApiControllers/Streaming/LiveApiController.cs +++ b/src/Yavsc/ApiControllers/Streaming/LiveApiController.cs @@ -39,9 +39,11 @@ namespace Yavsc.Controllers return await _dbContext.Tags.Where( t=> t.Name.StartsWith(id)).Select(t=>t.Name).Take(25).ToArrayAsync(); } - [HttpGet("live/{id}")] - public async Task GetLive(string id) + [HttpGet("live/uid-{id}")] + public async Task ByUserId(string id) { + // TODO read access rights + // TODO multiple channel if (!HttpContext.WebSockets.IsWebSocketRequest) return new BadRequestResult(); var uid = User.GetUserId(); var existent = _liveProcessor.Casters[id]; @@ -73,7 +75,7 @@ namespace Yavsc.Controllers } - [HttpGet("meta/{id}")] + [HttpGet("meta/uid-{id}")] public async Task GetLiveFlow([FromRoute] long id) { if (!ModelState.IsValid) @@ -163,29 +165,29 @@ namespace Yavsc.Controllers } // DELETE: api/LiveApi/5 - [HttpDelete("meta/{id}")] - public async Task DeleteLiveFlow([FromRoute] long id) + [HttpDelete("meta/uid-{uid}")] + public async Task DeleteLiveFlow([FromRoute] long uid) { if (!ModelState.IsValid) { return HttpBadRequest(ModelState); } - LiveFlow liveFlow = await _dbContext.LiveFlow.SingleAsync(m => m.Id == id); + LiveFlow liveFlow = await _dbContext.LiveFlow.SingleAsync(m => m.Id == uid); if (liveFlow == null) { return HttpNotFound(); } - var uid = User.GetUserId(); - if (liveFlow.OwnerId!=uid) + var cuid = User.GetUserId(); + if (liveFlow.OwnerId!=cuid) { ModelState.AddModelError("id","This flow isn't yours."); return HttpBadRequest(ModelState); } _dbContext.LiveFlow.Remove(liveFlow); - await _dbContext.SaveChangesAsync(uid); + await _dbContext.SaveChangesAsync(cuid); return Ok(liveFlow); } diff --git a/src/Yavsc/Makefile b/src/Yavsc/Makefile index 60967cb9..2f079b03 100644 --- a/src/Yavsc/Makefile +++ b/src/Yavsc/Makefile @@ -3,7 +3,7 @@ PRODDESTDIR=/srv/www/yavsc HOSTING=localhost ASPNET_LOG_LEVEL=debug SOURCE_DIR=$(HOME)/workspace/yavsc -MAKEFILE_DIR=$(SOURCE_DIR)/scripts/build/make +MAKEFILE_DIR=$(SOURCE_DIR)/scripts/make BASERESX= Resources/Yavsc.Models.IT.Fixing.Resources.resx \ Resources/Yavsc.ViewComponents.CommentViewComponent.resx \ Resources/Yavsc.ViewModels.FrontOffice.PerformerProfileViewModel.resx \ diff --git a/src/Yavsc/Models/ApplicationDbContext.cs b/src/Yavsc/Models/ApplicationDbContext.cs index 487f10d4..01264883 100644 --- a/src/Yavsc/Models/ApplicationDbContext.cs +++ b/src/Yavsc/Models/ApplicationDbContext.cs @@ -285,6 +285,7 @@ namespace Yavsc.Models public DbSet BlogTrad { get; set; } + [Obsolete("use signaled flows")] public DbSet LiveFlow { get; set; } public DbSet ChatRoomAccess { get; set; } diff --git a/src/Yavsc/Views/Home/About.cshtml b/src/Yavsc/Views/Home/About.cshtml index 49b4170e..dc220698 100755 --- a/src/Yavsc/Views/Home/About.cshtml +++ b/src/Yavsc/Views/Home/About.cshtml @@ -2,8 +2,8 @@ ViewData["Title"] = @SR["About"]+" "+@SiteSettings.Value.Title; }

@ViewData["Title"]

- - + +**Version de Development** ## L'objectif @@ -101,8 +101,6 @@ C'est mon site pérso, une configuration de _Yavsc_ (encore une autre très peti Autres installations: -* [Coiffure](http://coiffure.pschneider.fr) -* [ZicMoove](http://linkmuse.pschneider.fr) * [Yavsc](http://yavsc.pschneider.fr) @@ -125,8 +123,6 @@ Autres installations: En production: -* [Coiffure](https://coiffure.pschneider.fr) -* [ZicMoove](https://zicmoove.pschneider.fr) * [Lua](https://lua.pschneider.fr) * [Yavsc](https://yavsc.pschneider.fr) @@ -157,8 +153,6 @@ Veuillez excuser l'équipe de développement pour vous avoir fait part de cette La "pré-production" affiche les sites suivants: -* [Coiffure](https://coiffure.pschneider.fr) -* [ZicMoove](https://zicmoove.pschneider.fr) * [Yavsc](https://yavsc.pschneider.fr) * [Lua](https://lua.pschneider.fr) diff --git a/src/Yavsc/Views/Home/About.pt.cshtml b/src/Yavsc/Views/Home/About.pt.cshtml index 1d847005..26e1495c 100755 --- a/src/Yavsc/Views/Home/About.pt.cshtml +++ b/src/Yavsc/Views/Home/About.pt.cshtml @@ -122,8 +122,6 @@ Outras instalações: En production: -* [Coiffure](https://coiffure.pschneider.fr) -* [ZicMoove](https://zicmoove.pschneider.fr) * [Lua](https://lua.pschneider.fr) * [Yavsc](https://yavsc.pschneider.fr) @@ -154,8 +152,6 @@ Por favor, desculpe a equipe de desenvolvimento para informá-lo sobre este ende A "pré-produção" exibe os seguintes sites: -* [Coiffure](https://coiffure.pschneider.fr) -* [ZicMoove](https://zicmoove.pschneider.fr) * [Yavsc](https://yavsc.pschneider.fr) * [Lua](https://lua.pschneider.fr)