fix: [authkeys] allow for authkeys with no expiration set, fixes #169
parent
7bbfb82e50
commit
eabd56210a
|
@ -90,6 +90,9 @@ class AuthKeysController extends AppController
|
||||||
if (!in_array($data['user_id'], array_keys($users))) {
|
if (!in_array($data['user_id'], array_keys($users))) {
|
||||||
throw new MethodNotAllowedException(__('You are not authorised to do that.'));
|
throw new MethodNotAllowedException(__('You are not authorised to do that.'));
|
||||||
}
|
}
|
||||||
|
if (empty($data['expiration'])) {
|
||||||
|
$data['expiration'] = 0;
|
||||||
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -16,6 +16,7 @@ echo $this->element('genericElements/Form/genericForm', [
|
||||||
'field' => 'expiration',
|
'field' => 'expiration',
|
||||||
'label' => __('Expiration'),
|
'label' => __('Expiration'),
|
||||||
'type' => 'datetime',
|
'type' => 'datetime',
|
||||||
|
'required' => false
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'submit' => [
|
'submit' => [
|
||||||
|
|
Loading…
Reference in New Issue