1
0
Fork 0
mirror of synced 2024-09-29 17:01:37 +13:00

Merge pull request #4912 from appwrite/fix-auth-session-limit-model

Fix: auth session limit model
This commit is contained in:
Eldad A. Fux 2022-12-27 16:38:41 +02:00 committed by GitHub
commit 8681acfeab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -239,7 +239,7 @@ class Project extends Model
$document->setAttribute('authLimit', $authValues['limit'] ?? 0);
$document->setAttribute('authDuration', $authValues['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG);
$document->setAttribute('authSessionLimit', $authValues['maxSessions'] ?? APP_LIMIT_USER_SESSIONS_DEFAULT);
$document->setAttribute('authSessionsLimit', $authValues['maxSessions'] ?? APP_LIMIT_USER_SESSIONS_DEFAULT);
foreach ($auth as $index => $method) {
$key = $method['key'];

View file

@ -877,7 +877,7 @@ class ProjectsConsoleClientTest extends Scope
/**
* @depends testUpdateProjectAuthLimit
*/
public function testUpdateProjectAuthSessionLimit($data): array
public function testUpdateProjectAuthSessionsLimit($data): array
{
$id = $data['projectId'] ?? '';
@ -905,7 +905,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertNotEmpty($response['body']['$id']);
$this->assertNotEmpty($response['body']['$id']);
$this->assertEquals(1, $response['body']['authSessionsLimit']);
$email = uniqid() . 'user@localhost.test';
$password = 'password';