-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to create user on the fly on Oauth auth step (#2475)
- Loading branch information
Showing
7 changed files
with
139 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
database/migrations/2024_06_21_154247_create_user_if_not_exists_on_oauth.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
use App\Models\Extensions\BaseConfigMigration; | ||
|
||
return new class() extends BaseConfigMigration { | ||
public const OAUTH = 'OAuth & SSO'; | ||
|
||
public function getConfigs(): array | ||
{ | ||
return [ | ||
[ | ||
'key' => 'oauth_create_user_on_first_attempt', | ||
'value' => '0', | ||
'is_secret' => true, | ||
'cat' => self::OAUTH, | ||
'type_range' => '0|1', | ||
'description' => 'Allow user creation when oauth id does not exist.', | ||
], | ||
[ | ||
'key' => 'oauth_grant_new_user_upload_rights', | ||
'value' => '0', | ||
'is_secret' => true, | ||
'cat' => self::OAUTH, | ||
'type_range' => '0|1', | ||
'description' => 'Newly created user are allowed to upload content.', | ||
], | ||
[ | ||
'key' => 'oauth_grant_new_user_modification_rights', | ||
'value' => '0', | ||
'is_secret' => true, | ||
'cat' => self::OAUTH, | ||
'type_range' => '0|1', | ||
'description' => 'Newly created user are allowed to edit their profile.', | ||
], | ||
]; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters