mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Реализован функционал получения информации об аккауте после выполнения oAuth авторизации
This commit is contained in:
18
console/migrations/m160803_185857_account_permissions.php
Normal file
18
console/migrations/m160803_185857_account_permissions.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use console\db\Migration;
|
||||
|
||||
class m160803_185857_account_permissions extends Migration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->batchInsert('{{%oauth_scopes}}', ['id'], [
|
||||
['account_info'],
|
||||
['account_email'],
|
||||
]);
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->delete('{{%oauth_scopes}}', ['id' => ['account_info', 'account_email']]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
use console\db\Migration;
|
||||
|
||||
class m160803_185857_permission_email_access extends Migration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->insert('{{%oauth_scopes}}', ['id' => 'account_email']);
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->delete('{{%oauth_scopes}}', ['id' => 'account_email']);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user