我滴个乖乖
This commit is contained in:
13
ZelWiki.Library/Interfaces/IAccountProfile.cs
Normal file
13
ZelWiki.Library/Interfaces/IAccountProfile.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace ZelWiki.Library.Interfaces
|
||||
{
|
||||
public interface IAccountProfile
|
||||
{
|
||||
public string Role { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public string EmailAddress { get; set; }
|
||||
public string AccountName { get; set; }
|
||||
public string Navigation { get; set; }
|
||||
public string? Theme { get; set; }
|
||||
public string TimeZone { get; set; }
|
||||
}
|
||||
}
|
||||
19
ZelWiki.Library/Interfaces/IPage.cs
Normal file
19
ZelWiki.Library/Interfaces/IPage.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace ZelWiki.Library.Interfaces
|
||||
{
|
||||
public interface IPage
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Revision { get; set; }
|
||||
public int MostCurrentRevision { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Namespace { get; }
|
||||
public string Title { get; }
|
||||
public string Body { get; }
|
||||
public string Navigation { get; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
public bool IsHistoricalVersion { get; }
|
||||
public bool Exists { get; }
|
||||
}
|
||||
}
|
||||
44
ZelWiki.Library/Interfaces/ISessionState.cs
Normal file
44
ZelWiki.Library/Interfaces/ISessionState.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace ZelWiki.Library.Interfaces
|
||||
{
|
||||
public interface ISessionState
|
||||
{
|
||||
public IAccountProfile? Profile { get; set; }
|
||||
|
||||
IQueryCollection? QueryString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Is the current user (or anonymous) allowed to view?
|
||||
/// </summary>
|
||||
public bool CanView => true;
|
||||
|
||||
/// <summary>
|
||||
/// Is the current user allowed to edit?
|
||||
/// </summary>
|
||||
public bool CanEdit { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Is the current user allowed to perform administrative functions?
|
||||
/// </summary>
|
||||
public bool CanAdmin { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Is the current user allowed to moderate content (such as delete comments, and view moderation tools)?
|
||||
/// </summary>
|
||||
public bool CanModerate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Is the current user allowed to create pages?
|
||||
/// </summary>
|
||||
public bool CanCreate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Is the current user allowed to delete unprotected pages?
|
||||
/// </summary>
|
||||
public bool CanDelete { get; }
|
||||
|
||||
public DateTime LocalizeDateTime(DateTime datetime);
|
||||
public TimeZoneInfo GetPreferredTimeZone();
|
||||
}
|
||||
}
|
||||
7
ZelWiki.Library/Interfaces/IWikiEmailSender.cs
Normal file
7
ZelWiki.Library/Interfaces/IWikiEmailSender.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace ZelWiki.Library.Interfaces
|
||||
{
|
||||
public interface IWikiEmailSender
|
||||
{
|
||||
Task SendEmailAsync(string email, string subject, string htmlMessage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user