user list cleanup
This commit is contained in:
17
src/Yavsc.Server/Settings/UserPolicies.cs
Normal file
17
src/Yavsc.Server/Settings/UserPolicies.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Server.Settings
|
||||
{
|
||||
public class UserPolicies
|
||||
{
|
||||
public static readonly Dictionary<string, Func<ApplicationUser, bool>> Criterias =
|
||||
new Dictionary<string, Func<ApplicationUser, bool>>
|
||||
{
|
||||
{ "allow-monthly", u => u.AllowMonthlyEmail },
|
||||
{ "email-not-confirmed", u => !u.EmailConfirmed && u.DateCreated < DateTime.Now.AddDays(-7) },
|
||||
{ "user-to-remove", u => !u.EmailConfirmed && u.DateCreated < DateTime.Now.AddDays(-14) }
|
||||
};
|
||||
}
|
||||
}
|
@ -5,16 +5,6 @@ using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Templates
|
||||
{
|
||||
public static class TemplateConstants
|
||||
{
|
||||
public static readonly Dictionary<string, Func<ApplicationUser, bool>> Criterias =
|
||||
new Dictionary<string, Func<ApplicationUser, bool>>
|
||||
{
|
||||
{ "allow-monthly", u => u.AllowMonthlyEmail },
|
||||
{ "email-not-confirmed", u => !u.EmailConfirmed && u.DateCreated < DateTime.Now.AddDays(-7) }
|
||||
};
|
||||
}
|
||||
|
||||
public abstract class UserOrientedTemplate: Template
|
||||
{
|
||||
public ApplicationUser User { get; set; }
|
||||
|
Reference in New Issue
Block a user