PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 2.5.0
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v2.5.0
2.5.0 2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 All 34 releases
← All changes | app/Services/ImportService.php +5 -1 2.2.5 → 2.5.0 View file →
@@ -13,10 +13,14 @@
13 13 * @return \FluentBooking\App\Models\Calendar|\WP_Error
14 14 */
15 15 public function importHostJson($data, $useCurrentUser = true)
16 16 {
17 - if (!PermissionManager::userCan(['manage_all_data', 'invite_team_members', 'manage_other_calendars'])) {
17 + if (!PermissionManager::userCan(['manage_all_data', 'manage_other_calendars'])) {
18 18 return new \WP_Error('invalid_data', __('You are not authorized to import calendar', 'fluent-booking'));
19 + }
20 +
21 + if (!$useCurrentUser && !PermissionManager::userCan('manage_all_data')) {
22 + $useCurrentUser = true;
19 23 }
20 24
21 25 if (is_string($data)) {
22 26 $data = json_decode($data, true);