Merge pull request #4912 from appwrite/fix-auth-session-limit-model
Fix: auth session limit model
This commit is contained in:
commit
8681acfeab
2 changed files with 3 additions and 3 deletions
|
@ -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'];
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue