Skip to content

Commit

Permalink
add capability check again
Browse files Browse the repository at this point in the history
  • Loading branch information
amartya-dev committed Dec 18, 2023
1 parent 86d5382 commit 3d2d8e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function () {

if ( ! defined( 'NFD_AI_SERVICE_BASE' ) ) {
define( 'NFD_AI_SERVICE_BASE', 'https://hiive.cloud/workers/ai-proxy/v1/' );
define( 'NFD_AI_BASE', 'https://hiive.cloud/workers/ai-proxy/' );
define( 'NFD_AI_BASE', 'http://localhost:8787/' );
define( 'NFD_PATTERNS_BASE', 'https://patterns.hiive.cloud/' );
define( 'NFD_SITEGEN_OPTION', 'nfd-ai-site-gen' );
}
Expand Down
5 changes: 5 additions & 0 deletions includes/SiteGen/SiteGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ public static function generate_site_meta( $site_info, $identifier, $skip_cache
* @param boolean $regenerate If we need to regenerate.
*/
public static function get_home_pages( $site_description, $content_style, $target_audience, $regenerate = false ) {
if ( ! self::check_capabilities() ) {
return array(
'error' => __( 'You do not have the permissions to perform this action' ),
);
}

// Check if we have the response in cache already
if ( ! $regenerate ) {
Expand Down

0 comments on commit 3d2d8e5

Please sign in to comment.