From fe70cd65eaf685611703e6abfa01cd97acb8ed71 Mon Sep 17 00:00:00 2001 From: Ruben Ramirez Date: Fri, 4 Apr 2025 15:11:02 -0500 Subject: [PATCH] Temporarily disabled login requirement for backend pages --- template-assessment-builder.php | 4 ++-- template-manage-assessments.php | 4 ++-- template-manage-credits.php | 4 ++-- template-manage-jobs.php | 4 ++-- template-manage-questions.php | 4 ++-- template-quiztech-dashboard.php | 4 ++-- template-view-results.php | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/template-assessment-builder.php b/template-assessment-builder.php index 8e450cc..e375d1c 100644 --- a/template-assessment-builder.php +++ b/template-assessment-builder.php @@ -12,8 +12,8 @@ // Replace with a more specific capability like 'manage_quiztech_assessments' if defined. if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) { // Redirect to login page or show an error message. - wp_safe_redirect( wp_login_url( get_permalink() ) ); - exit; + // wp_safe_redirect( wp_login_url( get_permalink() ) ); + // exit; // Alternatively, display an error message: // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); } diff --git a/template-manage-assessments.php b/template-manage-assessments.php index be1c6fa..d54e2f0 100644 --- a/template-manage-assessments.php +++ b/template-manage-assessments.php @@ -13,8 +13,8 @@ $required_capability = 'edit_assessments'; // Corresponds to 'assessment' CPT ca if ( ! is_user_logged_in() || ! current_user_can( $required_capability ) ) { // Redirect to login page or show an error message. - wp_safe_redirect( wp_login_url( get_permalink() ) ); - exit; + // wp_safe_redirect( wp_login_url( get_permalink() ) ); + // exit; // Alternatively, display an error message: // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); } diff --git a/template-manage-credits.php b/template-manage-credits.php index 9ffa104..e992c32 100644 --- a/template-manage-credits.php +++ b/template-manage-credits.php @@ -13,8 +13,8 @@ $required_capability = 'read'; if ( ! is_user_logged_in() || ! current_user_can( $required_capability ) ) { // Redirect to login page or show an error message. - wp_safe_redirect( wp_login_url( get_permalink() ) ); - exit; + // wp_safe_redirect( wp_login_url( get_permalink() ) ); + // exit; // Alternatively, display an error message: // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); } diff --git a/template-manage-jobs.php b/template-manage-jobs.php index bfb4210..30eb8b0 100644 --- a/template-manage-jobs.php +++ b/template-manage-jobs.php @@ -12,8 +12,8 @@ // Replace with a more specific capability like 'manage_quiztech_jobs' if defined. if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) { // Redirect to login page or show an error message. - wp_safe_redirect( wp_login_url( get_permalink() ) ); - exit; + // wp_safe_redirect( wp_login_url( get_permalink() ) ); + // exit; // Alternatively, display an error message: // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); } diff --git a/template-manage-questions.php b/template-manage-questions.php index d6a14b1..6a65a3b 100644 --- a/template-manage-questions.php +++ b/template-manage-questions.php @@ -13,8 +13,8 @@ $required_capability = 'edit_questions'; // Corresponds to 'question' CPT capabi if ( ! is_user_logged_in() || ! current_user_can( $required_capability ) ) { // Redirect to login page or show an error message. - wp_safe_redirect( wp_login_url( get_permalink() ) ); - exit; + // wp_safe_redirect( wp_login_url( get_permalink() ) ); + // exit; // Alternatively, display an error message: // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); } diff --git a/template-quiztech-dashboard.php b/template-quiztech-dashboard.php index 2f0572a..2c7bc3c 100644 --- a/template-quiztech-dashboard.php +++ b/template-quiztech-dashboard.php @@ -12,8 +12,8 @@ // Replace with a more specific capability like 'manage_quiztech_options' if defined. if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) { // Redirect to login page or show an error message. - wp_safe_redirect( wp_login_url( get_permalink() ) ); - exit; + // wp_safe_redirect( wp_login_url( get_permalink() ) ); + // exit; // Alternatively, display an error message: // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); } diff --git a/template-view-results.php b/template-view-results.php index b06af69..87dfdb1 100644 --- a/template-view-results.php +++ b/template-view-results.php @@ -13,8 +13,8 @@ $required_capability = 'edit_jobs'; // Or a more specific 'view_results' capabil if ( ! is_user_logged_in() || ! current_user_can( $required_capability ) ) { // Redirect to login page or show an error message. - wp_safe_redirect( wp_login_url( get_permalink() ) ); - exit; + // wp_safe_redirect( wp_login_url( get_permalink() ) ); + // exit; // Alternatively, display an error message: // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); }