core/domain/services/graphql/mutators/DatetimeCreate.php 1 location
|
@@ 30-33 (lines=4) @@
|
27 |
|
/** |
28 |
|
* Stop now if a user isn't allowed to create a datetime. |
29 |
|
*/ |
30 |
|
if (! current_user_can('ee_edit_events')) { |
31 |
|
// translators: the %1$s is the name of the object being mutated |
32 |
|
throw new UserError(sprintf(__('Sorry, you are not allowed to create %1$s', 'event_espresso' ), $type->name())); |
33 |
|
} |
34 |
|
|
35 |
|
$args = DatetimeMutation::prepare_fields($input, $mutation_name); |
36 |
|
|
core/domain/services/graphql/mutators/DatetimeUpdate.php 1 location
|
@@ 28-31 (lines=4) @@
|
25 |
|
/** |
26 |
|
* Stop now if a user isn't allowed to create a datetime. |
27 |
|
*/ |
28 |
|
if (! current_user_can('ee_edit_events')) { |
29 |
|
// translators: the %1$s is the name of the object being mutated |
30 |
|
throw new UserError(sprintf(__('Sorry, you are not allowed to edit %1$s', 'event_espresso' ), $type->name())); |
31 |
|
} |
32 |
|
|
33 |
|
$id = ! empty($input['id']) ? absint($input['id']) : 0; |
34 |
|
$entity = null; |