From cdc61eb4ea5309769ad4db84d92594e4dc3dff67 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 20 Mar 2017 16:45:17 -0400 Subject: Initial commit (azure deploy test) --- Project-Unite/Models/AdminViewModels.cs | 87 +++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Project-Unite/Models/AdminViewModels.cs (limited to 'Project-Unite/Models/AdminViewModels.cs') diff --git a/Project-Unite/Models/AdminViewModels.cs b/Project-Unite/Models/AdminViewModels.cs new file mode 100644 index 0000000..56edbdd --- /dev/null +++ b/Project-Unite/Models/AdminViewModels.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace Project_Unite.Models +{ + public class AdminAccessControlViewModel + { + public AdminAccessControlViewModel() + { + + } + + public AdminAccessControlViewModel(Dictionary modelList) + { + ACLList = new List(); + foreach(var v in modelList.Values) + { + ACLList.AddRange(v); + } + IDs = modelList.Keys.ToList(); + } + + public List IDs { get; set; } + public List ACLList { get; set; } + } + + public class AddForumCategoryViewModel + { + public string Name { get; set; } + public string Description { get; set; } + public string Parent { get; set; } + + public string StealPermissionsFrom { get; set; } + + public IEnumerable PossibleParents { get; set; } + public string Id { get; internal set; } + } + + public enum PermissionPreset + { + None = 0, + CanRead = 1, + CanReply = 2, + CanPost = 3 + } + + public class ModeratorBanListViewModel + { + public IEnumerable UserBans { get; set; } + public IEnumerable IPBans { get; set; } + } + + public class AuditLog + { + public AuditLog() + { + + } + + public AuditLog(string uid, AuditLogLevel lvl, string desc) + { + Id = Guid.NewGuid().ToString(); + Level = lvl; + UserId = uid; + Description = desc; + Timestamp = DateTime.Now; + } + + public string Id { get; set; } + public AuditLogLevel Level { get; set; } + public DateTime Timestamp { get; set; } + public string UserId { get; set; } + public string Description { get; set; } + } + + [Flags] + public enum AuditLogLevel + { + Admin, + Moderator, + User + } +} \ No newline at end of file -- cgit v1.2.3