diff options
| author | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
| commit | cdc61eb4ea5309769ad4db84d92594e4dc3dff67 (patch) | |
| tree | a8297a7aecc4376f07a497a5e02ab5ff165bfbd3 /Project-Unite/Models/AdminViewModels.cs | |
| parent | d9f475e1f33bbf39ca0d79d7a6b0c2fd501b4f2d (diff) | |
| download | project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.gz project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.bz2 project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.zip | |
Initial commit (azure deploy test)
Diffstat (limited to 'Project-Unite/Models/AdminViewModels.cs')
| -rw-r--r-- | Project-Unite/Models/AdminViewModels.cs | 87 |
1 files changed, 87 insertions, 0 deletions
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<string, ForumPermission[]> modelList) + { + ACLList = new List<ForumPermission>(); + foreach(var v in modelList.Values) + { + ACLList.AddRange(v); + } + IDs = modelList.Keys.ToList(); + } + + public List<string> IDs { get; set; } + public List<ForumPermission> 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<SelectListItem> 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<ApplicationUser> UserBans { get; set; } + public IEnumerable<BannedIP> 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 |
