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/Views/Moderator/Bans.cshtml | 73 ++++++++++++++ Project-Unite/Views/Moderator/Index.cshtml | 7 ++ Project-Unite/Views/Moderator/Logs.cshtml | 25 +++++ Project-Unite/Views/Moderator/UserDetails.cshtml | 116 +++++++++++++++++++++++ Project-Unite/Views/Moderator/Users.cshtml | 28 ++++++ 5 files changed, 249 insertions(+) create mode 100644 Project-Unite/Views/Moderator/Bans.cshtml create mode 100644 Project-Unite/Views/Moderator/Index.cshtml create mode 100644 Project-Unite/Views/Moderator/Logs.cshtml create mode 100644 Project-Unite/Views/Moderator/UserDetails.cshtml create mode 100644 Project-Unite/Views/Moderator/Users.cshtml (limited to 'Project-Unite/Views/Moderator') diff --git a/Project-Unite/Views/Moderator/Bans.cshtml b/Project-Unite/Views/Moderator/Bans.cshtml new file mode 100644 index 0000000..90e20fc --- /dev/null +++ b/Project-Unite/Views/Moderator/Bans.cshtml @@ -0,0 +1,73 @@ +@model Project_Unite.Models.ModeratorBanListViewModel +@{ + ViewBag.Moderator = true; + ViewBag.Title = "Bans"; +} + +

Bans

+ + + +
+
+

User bans

+

Below is a list of all user bans. User bans prevent users from logging into their accounts.

+ + + + + + + + + @foreach(var u in Model.UserBans.OrderByDescending(x=>x.BannedAt)) + { + + + + + + + } +
UserBannerTimestampActions
@Html.UserLink(u.Id)@Html.UserLink(u.BannedBy)@u.BannedAt + @if(ACL.Granted(User.Identity.Name, "CanIssueBan")) + { + if(ACL.CanManageRole(User.Identity.Name, u.HighestRole.Id)) + { + @Html.ActionLink("Unban", "Unban", "Moderator", new { id=u.Id}, new { @class="btn btn-default"}) + } + } + +
+
+
+

IP address bans

+

Below is a list of IP address bans on the site. IP bans prevent users with a certain IP address from even attempting to access the website and multi-user domain by sending back "Forbidden" responses and denying connection.

+
BE EXTREMELY CAUTIOUS.
+

The system does NOT associate IP addresses with usernames - it can't. If you are unsure who's IP address you are unbanning, contact someone who is sure before taking any action. We have no idea what that computer or network is capable of.

+ + + + + + + + + @foreach (var u in Model.IPBans) + { + + + + + } +
UserBannerTimestampActions
@u.Address + @if (ACL.Granted(User.Identity.Name, "CanIssueIPBan")) + { + @Html.ActionLink("Unban", "UnbanIP", "Moderator", new { id = u.Id }, new { @class = "btn btn-danger" }) + } +
+
+
\ No newline at end of file diff --git a/Project-Unite/Views/Moderator/Index.cshtml b/Project-Unite/Views/Moderator/Index.cshtml new file mode 100644 index 0000000..d4b6569 --- /dev/null +++ b/Project-Unite/Views/Moderator/Index.cshtml @@ -0,0 +1,7 @@ + +@{ + ViewBag.Title = "Moderator CP"; +} + + + diff --git a/Project-Unite/Views/Moderator/Logs.cshtml b/Project-Unite/Views/Moderator/Logs.cshtml new file mode 100644 index 0000000..bf3ed4d --- /dev/null +++ b/Project-Unite/Views/Moderator/Logs.cshtml @@ -0,0 +1,25 @@ +@model IEnumerable +@{ + ViewBag.Moderator = true; + ViewBag.Title = "Audit logs"; +} + +

Moderator audit logs

+ +

Below is a list of all actions carried out by moderators and users that can be reviewed as evidence when investigating a guideline break.

+ + + + + + + + @foreach(var i in Model.OrderByDescending(x=>x.Timestamp)) + { + + + + + + } +
ActionUser & TimestampLevel
@i.Description@Html.UserLink(i.UserId) at @i.Timestamp@i.Level
\ No newline at end of file diff --git a/Project-Unite/Views/Moderator/UserDetails.cshtml b/Project-Unite/Views/Moderator/UserDetails.cshtml new file mode 100644 index 0000000..74556df --- /dev/null +++ b/Project-Unite/Views/Moderator/UserDetails.cshtml @@ -0,0 +1,116 @@ +@model Project_Unite.Models.ApplicationUser +@{ + ViewBag.Moderator = true; + ViewBag.Title = "User details"; +} + +

User details

+ +

@Html.UserLink(Model.Id)

+ + \ No newline at end of file diff --git a/Project-Unite/Views/Moderator/Users.cshtml b/Project-Unite/Views/Moderator/Users.cshtml new file mode 100644 index 0000000..b352d53 --- /dev/null +++ b/Project-Unite/Views/Moderator/Users.cshtml @@ -0,0 +1,28 @@ +@model IEnumerable +@{ + ViewBag.Moderator = true; + ViewBag.Title = "Users"; +} + +

Users

+ +

Below is a list of all users in the database.

+ + + + + + + @foreach (var user in Model) + { + + + + + } +
UserActions
@Html.UserLink(user.Id) + + @Html.ActionLink("User details", "UserDetails", "Moderator", new { id = user.DisplayName }, new { @class = "btn btn-default" }) + + +
\ No newline at end of file -- cgit v1.2.3