diff --git a/user/plugins/auth-mgr-plus/403-error.html b/user/plugins/auth-mgr-plus/403-error.html new file mode 100644 index 0000000..e1c266b --- /dev/null +++ b/user/plugins/auth-mgr-plus/403-error.html @@ -0,0 +1,24 @@ +
+
+
+
+
+ UTC Logo +
+
+
Access Denied
+
go.UTC.edu is the UTC URL Shortener
+

Your account does not have access to this app, other than to follow links.

+ go to www.UTC.edu +
+
+
+ © go.UTC.edu +
+ About + Privacy +
+
+
+
+
\ No newline at end of file diff --git a/user/plugins/auth-mgr-plus/plugin.php b/user/plugins/auth-mgr-plus/plugin.php index bdf324a..38e632c 100644 --- a/user/plugins/auth-mgr-plus/plugin.php +++ b/user/plugins/auth-mgr-plus/plugin.php @@ -237,8 +237,11 @@ function amp_require_capability( $capability ) { if ( !amp_have_capability( $capability ) ) { // If the user can't view admin interface, return a plain error. if ( !amp_have_capability( ampCap::ShowAdmin ) ) { - // header("HTTP/1.0 403 Forbidden"); - die('Require permissions to show admin interface.'); + header("HTTP/1.0 403 Forbidden"); + $errorpage = file_get_contents('user/plugins/auth-mgr-plus/403-error.html'); + yourls_status_header( 403 ); + echo $errorpage; + die(); } // Otherwise, render errors in admin interface yourls_redirect( yourls_admin_url( '?access=denied' ), 302 );