Добавлен oauth2 пермишен на запрос E-mail адреса пользователя

This commit is contained in:
ErickSkrauch 2016-08-03 22:05:19 +03:00
parent 6efbbb7098
commit 71d9511d8e
2 changed files with 16 additions and 1 deletions

View File

@ -1,7 +1,6 @@
<?php
namespace common\models;
use Yii;
use yii\db\ActiveRecord;
/**
@ -12,6 +11,7 @@ class OauthScope extends ActiveRecord {
const OFFLINE_ACCESS = 'offline_access';
const MINECRAFT_SERVER_SESSION = 'minecraft_server_session';
const ACCOUNT_EMAIL = 'account_email';
public static function tableName() {
return '{{%oauth_scopes}}';

View File

@ -0,0 +1,15 @@
<?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']);
}
}