IdentityServer8

This commit is contained in:
Paul Schneider 2025-02-08 20:06:24 +00:00
commit a16188338a
47 changed files with 4077 additions and 529 deletions

View file

@ -20,10 +20,6 @@ namespace Yavsc.Models.Blog
[Display(Name="Identifiant du post")]
public long Id { get; set; }
[Display(Name="Indice de qualité")]
public int Rate { get; set; }
[Display(Name="Identifiant de l'auteur")]
[ForeignKey("Author")]
public string AuthorId { get; set; }
@ -60,11 +56,6 @@ namespace Yavsc.Models.Blog
{
return ACL?.Any( i=>i.CircleId == circleId) ?? true;
}
public string GetOwnerId()
{
return AuthorId;
}
public ICircleAuthorization[] GetACL()
{
@ -93,5 +84,8 @@ namespace Yavsc.Models.Blog
[InverseProperty("Post")]
public virtual List<Comment> Comments { get; set; }
[NotMapped]
public string OwnerId => AuthorId;
}
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace Yavsc.ViewModels.BlogSpot
{
public class NewPost
{
[Required]
public string Title{ get; set; }
[Required]
public string Content { get; set; }
}
}