mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
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('authLimit', $authValues['limit'] ?? 0);
|
||||||
$document->setAttribute('authDuration', $authValues['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG);
|
$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) {
|
foreach ($auth as $index => $method) {
|
||||||
$key = $method['key'];
|
$key = $method['key'];
|
||||||
|
|
|
||||||
|
|
@ -877,7 +877,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||||
/**
|
/**
|
||||||
* @depends testUpdateProjectAuthLimit
|
* @depends testUpdateProjectAuthLimit
|
||||||
*/
|
*/
|
||||||
public function testUpdateProjectAuthSessionLimit($data): array
|
public function testUpdateProjectAuthSessionsLimit($data): array
|
||||||
{
|
{
|
||||||
$id = $data['projectId'] ?? '';
|
$id = $data['projectId'] ?? '';
|
||||||
|
|
||||||
|
|
@ -905,7 +905,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||||
|
|
||||||
$this->assertEquals(200, $response['headers']['status-code']);
|
$this->assertEquals(200, $response['headers']['status-code']);
|
||||||
$this->assertNotEmpty($response['body']['$id']);
|
$this->assertNotEmpty($response['body']['$id']);
|
||||||
$this->assertNotEmpty($response['body']['$id']);
|
$this->assertEquals(1, $response['body']['authSessionsLimit']);
|
||||||
|
|
||||||
$email = uniqid() . 'user@localhost.test';
|
$email = uniqid() . 'user@localhost.test';
|
||||||
$password = 'password';
|
$password = 'password';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue