Mare 0.9 (#27)
* add jwt expiry * update api * merge * start rework permissions * ok so in theory this compiles * make it work I guess * reuse some permissions * fix intermediate connectivity issues * fixes * whatever * some fixes I guess * fix some stuff * idk some random fixes I guess * change some defaults * update nuget * adjust order of operations * adjust deletion of account * remove todo --------- Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
@@ -10,11 +10,6 @@ public class ClientPair
|
||||
[MaxLength(10)]
|
||||
public string OtherUserUID { get; set; }
|
||||
public User OtherUser { get; set; }
|
||||
public bool IsPaused { get; set; }
|
||||
public bool AllowReceivingMessages { get; set; } = false;
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public bool DisableSounds { get; set; } = false;
|
||||
public bool DisableAnimations { get; set; } = false;
|
||||
public bool DisableVFX { get; set; } = false;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class Group
|
||||
public string Alias { get; set; }
|
||||
public bool InvitesEnabled { get; set; }
|
||||
public string HashedPassword { get; set; }
|
||||
public bool DisableSounds { get; set; }
|
||||
public bool DisableAnimations { get; set; }
|
||||
public bool DisableVFX { get; set; }
|
||||
public bool PreferDisableSounds { get; set; }
|
||||
public bool PreferDisableAnimations { get; set; }
|
||||
public bool PreferDisableVFX { get; set; }
|
||||
}
|
||||
|
||||
@@ -6,10 +6,6 @@ public class GroupPair
|
||||
public Group Group { get; set; }
|
||||
public string GroupUserUID { get; set; }
|
||||
public User GroupUser { get; set; }
|
||||
public bool IsPaused { get; set; }
|
||||
public bool IsPinned { get; set; }
|
||||
public bool IsModerator { get; set; }
|
||||
public bool DisableSounds { get; set; }
|
||||
public bool DisableAnimations { get; set; }
|
||||
public bool DisableVFX { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class GroupPairPreferredPermission
|
||||
{
|
||||
public string GroupGID { get; set; }
|
||||
public Group Group { get; set; }
|
||||
public string UserUID { get; set; }
|
||||
public User User { get; set; }
|
||||
public bool IsPaused { get; set; }
|
||||
public bool DisableAnimations { get; set; }
|
||||
public bool DisableSounds { get; set; }
|
||||
public bool DisableVFX { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class UserDefaultPreferredPermission
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(10)]
|
||||
[ForeignKey("User")]
|
||||
public string UserUID { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public bool DisableIndividualAnimations { get; set; } = false;
|
||||
public bool DisableIndividualSounds { get; set; } = false;
|
||||
public bool DisableIndividualVFX { get; set; } = false;
|
||||
public bool DisableGroupAnimations { get; set; } = false;
|
||||
public bool DisableGroupSounds { get; set; } = false;
|
||||
public bool DisableGroupVFX { get; set; } = false;
|
||||
public bool IndividualIsSticky { get; set; } = false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class UserPermissionQuery
|
||||
{
|
||||
public string UserUID { get; set; }
|
||||
public string OtherUserUID { get; set; }
|
||||
public string Alias { get; set; }
|
||||
public string GID { get; set; }
|
||||
public bool Synced { get; set; }
|
||||
public bool OwnpermIsPaused { get; set; }
|
||||
public bool OwnpermSticky { get; set; }
|
||||
public bool OwnpermDisableAnimations { get; set; }
|
||||
public bool OwnpermDisableSounds { get; set; }
|
||||
public bool OwnpermDisableVFX { get; set; }
|
||||
public bool? OtherpermIsPaused { get; set; }
|
||||
public bool? OtherpermDisableAnimations { get; set; }
|
||||
public bool? OtherpermDisableSounds { get; set; }
|
||||
public bool? OtherpermDisableVFX { get; set; }
|
||||
|
||||
public UserPermissionSet OwnPermissions => new UserPermissionSet
|
||||
{
|
||||
UserUID = UserUID,
|
||||
OtherUserUID = OtherUserUID,
|
||||
IsPaused = OwnpermIsPaused,
|
||||
DisableAnimations = OwnpermDisableAnimations,
|
||||
DisableSounds = OwnpermDisableSounds,
|
||||
DisableVFX = OwnpermDisableVFX,
|
||||
Sticky = OwnpermSticky
|
||||
};
|
||||
|
||||
public UserPermissionSet? OtherPermissions => !Synced ? null : new UserPermissionSet
|
||||
{
|
||||
UserUID = OtherUserUID,
|
||||
OtherUserUID = UserUID,
|
||||
IsPaused = OtherpermIsPaused ?? false,
|
||||
DisableAnimations = OtherpermDisableAnimations ?? false,
|
||||
DisableSounds = OtherpermDisableSounds ?? false,
|
||||
DisableVFX = OtherpermDisableVFX ?? false,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class UserPermissionSet
|
||||
{
|
||||
[NotNull]
|
||||
public string UserUID { get; set; }
|
||||
public User User { get; set; }
|
||||
[NotNull]
|
||||
public string OtherUserUID { get; set; }
|
||||
public User OtherUser { get; set; }
|
||||
public bool Sticky { get; set; } = false;
|
||||
public bool IsPaused { get; set; } = false;
|
||||
public bool DisableAnimations { get; set; } = false;
|
||||
public bool DisableVFX { get; set; } = false;
|
||||
public bool DisableSounds { get; set; } = false;
|
||||
}
|
||||
Reference in New Issue
Block a user