();
if (showAccepted)
diff --git a/SS14.Admin/Pages/Players/Index.cshtml b/SS14.Admin/Pages/Players/Index.cshtml
index bcb148c..06ee8fa 100644
--- a/SS14.Admin/Pages/Players/Index.cshtml
+++ b/SS14.Admin/Pages/Players/Index.cshtml
@@ -43,8 +43,16 @@
@player.UserId |
@player.LastSeenTime.ToString("yyyy-MM-dd HH:mm:ss") |
- @player.LastSeenAddress |
- @BanHelper.FormatHwid(player.LastSeenHWId) |
+ @if (User.IsInRole(Constants.PIIRole))
+ {
+ @player.LastSeenAddress |
+ @BanHelper.FormatHwid(player.LastSeenHWId) |
+ }
+ else
+ {
+ Hidden |
+ Hidden |
+ }
@player.FirstSeenTime.ToString("yyyy-MM-dd HH:mm:ss") |
Player Info
diff --git a/SS14.Admin/Pages/Players/Index.cshtml.cs b/SS14.Admin/Pages/Players/Index.cshtml.cs
index 23264dc..37c8034 100644
--- a/SS14.Admin/Pages/Players/Index.cshtml.cs
+++ b/SS14.Admin/Pages/Players/Index.cshtml.cs
@@ -40,7 +40,7 @@ public async Task OnGetAsync(
AllRouteData.Add("search", CurrentFilter);
IQueryable userQuery = _dbContext.Player;
- userQuery = SearchHelper.SearchPlayers(userQuery, search);
+ userQuery = SearchHelper.SearchPlayers(userQuery, search, User);
userQuery = SortState.ApplyToQuery(userQuery);
diff --git a/SS14.Admin/Pages/Players/Info.cshtml b/SS14.Admin/Pages/Players/Info.cshtml
index 3219fda..395dcaa 100644
--- a/SS14.Admin/Pages/Players/Info.cshtml
+++ b/SS14.Admin/Pages/Players/Info.cshtml
@@ -22,18 +22,21 @@
@Model.Player.FirstSeenTime.ToString("yyyy-MM-dd HH:mm:ss")
Last seen time:
@Model.Player.LastSeenTime.ToString("yyyy-MM-dd HH:mm:ss")
- Last seen address:
-
-
- @Model.Player.LastSeenAddress
-
-
- Last seen HWID:
-
-
- @BanHelper.FormatHwid(Model.Player.LastSeenHWId)
-
-
+ @if (User.IsInRole(Constants.PIIRole))
+ {
+ Last seen address:
+
+
+ @Model.Player.LastSeenAddress
+
+
+ Last seen HWID:
+
+
+ @BanHelper.FormatHwid(Model.Player.LastSeenHWId)
+
+
+ }
Whitelisted:
@if (Model.Whitelisted)
diff --git a/SS14.Admin/Pages/Players/Info.cshtml.cs b/SS14.Admin/Pages/Players/Info.cshtml.cs
index 12db6e9..82a3ab3 100644
--- a/SS14.Admin/Pages/Players/Info.cshtml.cs
+++ b/SS14.Admin/Pages/Players/Info.cshtml.cs
@@ -39,8 +39,8 @@ public async Task OnGetAsync(
GameBanPagination.Init(pageIndex, perPage, GameBanRouteData);
RoleBanPagination.Init(pageIndex, perPage, RoleBanRouteData);
- var gameBans = SearchHelper.SearchServerBans(_banHelper.CreateServerBanJoin(), userId.ToString());
- var roleBans = SearchHelper.SearchRoleBans(_banHelper.CreateRoleBanJoin(), userId.ToString());
+ var gameBans = SearchHelper.SearchServerBans(_banHelper.CreateServerBanJoin(), userId.ToString(), User);
+ var roleBans = SearchHelper.SearchRoleBans(_banHelper.CreateRoleBanJoin(), userId.ToString(), User);
GameBanRouteData.Add("search", userId.ToString());
GameBanRouteData.Add("show", "all");
diff --git a/SS14.Admin/Pages/RoleBans/Index.cshtml.cs b/SS14.Admin/Pages/RoleBans/Index.cshtml.cs
index 38cc18f..cf04137 100644
--- a/SS14.Admin/Pages/RoleBans/Index.cshtml.cs
+++ b/SS14.Admin/Pages/RoleBans/Index.cshtml.cs
@@ -35,7 +35,7 @@ public async Task OnGetAsync(
{
Pagination.Init(pageIndex, perPage, AllRouteData);
- var bans = SearchHelper.SearchRoleBans(_banHelper.CreateRoleBanJoin(), search);
+ var bans = SearchHelper.SearchRoleBans(_banHelper.CreateRoleBanJoin(), search, User);
bans = show switch
{
diff --git a/SS14.Admin/Pages/Tables/BansTable.cshtml b/SS14.Admin/Pages/Tables/BansTable.cshtml
index 4ce355f..354a850 100644
--- a/SS14.Admin/Pages/Tables/BansTable.cshtml
+++ b/SS14.Admin/Pages/Tables/BansTable.cshtml
@@ -52,7 +52,7 @@
}
- @if (User.IsInRole("ADMIN"))
+ @if (User.IsInRole(Constants.PIIRole))
{
if (ban.Address != null)
{
diff --git a/SS14.Admin/Pages/Tables/ConnectionsTable.cshtml b/SS14.Admin/Pages/Tables/ConnectionsTable.cshtml
index 1bde37b..9a93211 100644
--- a/SS14.Admin/Pages/Tables/ConnectionsTable.cshtml
+++ b/SS14.Admin/Pages/Tables/ConnectionsTable.cshtml
@@ -34,8 +34,16 @@
|
@log.UserId |
@log.Time.ToString("yyyy-MM-dd HH:mm:ss") |
- @log.Address |
- @(log.HWId is { } hwid ? Convert.ToBase64String(hwid) : null) |
+ @if (User.IsInRole(Constants.PIIRole))
+ {
+ @log.Address |
+ @(log.HWId is { } hwid ? Convert.ToBase64String(hwid) : null) |
+ }
+ else
+ {
+ Hidden |
+ Hidden |
+ }
@switch (log.Denied)
{
|