Merge branch '0.8.x' into feat-auth-limits
This commit is contained in:
commit
ba49f4d367
|
@ -646,10 +646,14 @@ App::post('/v1/account/sessions/anonymous')
|
|||
|
||||
$protocol = $request->getProtocol();
|
||||
|
||||
if ($user->getId() || 'console' === $project->getId()) {
|
||||
if ('console' === $project->getId()) {
|
||||
throw new Exception('Failed to create anonymous user.', 401);
|
||||
}
|
||||
|
||||
if ($user->getId()) {
|
||||
throw new Exception('Cannot create an anonymous user when logged in.', 401);
|
||||
}
|
||||
|
||||
$limit = $project->getAttribute('usersAuthLimit', 0);
|
||||
|
||||
if ($limit !== 0) {
|
||||
|
|
|
@ -283,6 +283,9 @@ class MySQL extends Adapter
|
|||
if (\is_array($prop['value'])) {
|
||||
throw new Exception('Value can\'t be an array: '.\json_encode($prop['value']));
|
||||
}
|
||||
if (\is_bool($prop['value'])) {
|
||||
$prop['value'] = (int) $prop['value'];
|
||||
}
|
||||
$st2->bindValue(':documentUid', $data['$id'], PDO::PARAM_STR);
|
||||
$st2->bindValue(':documentRevision', $revision, PDO::PARAM_STR);
|
||||
|
||||
|
|
Loading…
Reference in a new issue