From c84f6193547370d6786609404e6dbc51f181d7b0 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 9 May 2017 16:00:37 -0400 Subject: Redo the permission system. --- Project-Unite/Views/Shared/_Layout.cshtml | 86 ++----------------------------- 1 file changed, 5 insertions(+), 81 deletions(-) (limited to 'Project-Unite/Views/Shared') diff --git a/Project-Unite/Views/Shared/_Layout.cshtml b/Project-Unite/Views/Shared/_Layout.cshtml index 5ade38b..8c21f1c 100644 --- a/Project-Unite/Views/Shared/_Layout.cshtml +++ b/Project-Unite/Views/Shared/_Layout.cshtml @@ -97,9 +97,9 @@ }
-
+
-

Welcome to Project: Unite! Things are a bit barren right now and not a lot of stuff is implemented - but feel free to explore!

+

Do things seem broken? We are currently working on streamlining the permission system and its backend. Please be patient!

@@ -112,84 +112,8 @@
} - @if (ViewBag.Moderator == true) - { - - @RenderBody(); - } - else if (ViewBag.Developer == true) - { - - - - @RenderBody(); - } - else if (ACL.Granted(User.Identity.Name, ViewBag.ACLRule)) - { - if (ViewBag.Admin == true) - { - if (ACL.Granted(User.Identity.Name, "CanAccessAdminCP")) - { - - - - @RenderBody(); - } - else - { -

Access denied.

-

You do not have permission to access this page. Contact an admin if this is in error.

- } - } - else - { - - @RenderBody() - - } - } - else - { -

Access denied.

-

You do not have permission to access this page. Contact an admin if this is in error.

- - }
+ @RenderBody() +
@@ -232,7 +156,7 @@

We'd like to formally thank Philip Adams. Without him, we would not exist. Phil has contributed years of work and help to ShiftOS and is the original developer of the game. He has written code that is still used to this day in modern ShiftOS, and much of the ideas and mechanics in the game are from his mind.

Check Phil out on YouTube: OSFirstTimer | AstralPhaser | YouTube Millionaire

- @if (ACL.Granted(User.Identity.Name, "CanAccessAdminCP")) + @if (User.Identity.IsAdmin()) {

@Html.ActionLink("Administrator Control Panel", "Index", "Admin")

} -- cgit v1.2.3