Commit 84436351 authored by Joe Hoyle's avatar Joe Hoyle
Browse files

Added a generate-iam-policy command incase the user wants to manually create...

Added a generate-iam-policy command incase the user wants to manually create an IAM user and attach the policy
parent f28f5045
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -138,6 +138,21 @@ class S3_Uploads_WP_CLI_Command extends WP_CLI_Command {
  ]
}';
	}

	/**
	 * Create AWS IAM Policy that S3 Uploads requires
	 *
	 * It's typically not a good idea to use access keys that have full access to your S3 account,
	 * as if the keys are compromised through the WordPress site somehow, you don't
	 * want to give full control via those keys.
	 *
	 * @subcommand generate-iam-policy
	 */
	public function generate_iam_policy() {

		WP_Cli::print_value( $this->get_iam_policy() );

	}
}

WP_CLI::add_command( 's3-uploads', 'S3_Uploads_WP_CLI_Command' );
 No newline at end of file