Circles, pub & auth

* Adds a boolean to each Circle, saying that
  it is public, and its existence may be known by any interested in
* Adds claims of type "YavscClaimTypes.CircleMembership" at
  login, in order to implement some faster authorisation processes and file restricted accesses.
This commit is contained in:
2019-07-30 18:42:22 +02:00
parent 65eceabbd3
commit 855e779f14
12 changed files with 3154 additions and 88 deletions

View File

@ -109,6 +109,9 @@ namespace Yavsc.Models
[JsonIgnore][InverseProperty("User")]
public virtual List<ChatRoomAccess> RoomAccess { get; set; }
[JsonIgnore][InverseProperty("Member")]
public virtual List<CircleMember> Membership { get; set; }
public DateTime DateCreated
{
get; set;

View File

@ -7,9 +7,12 @@ using Newtonsoft.Json;
namespace Yavsc.Models.Relationship
{
public class Circle {
[Key, DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public bool Public { get; set; }
public string Name { get; set; }
public string OwnerId { get; set; }

View File

@ -13,6 +13,7 @@ namespace Yavsc.Models.Relationship
[ForeignKey("CircleId")]
public virtual Circle Circle { get; set; }
[Required]
public string MemberId { get; set; }