Commit f0d7a52d by Alexander Makarov

Removed User.role from advanced application template because it was causing…

Removed User.role from advanced application template because it was causing confusion that user could be assinged a single RBAC role and that role field is somehow tied to RBAC at all.
parent 23e51edf
......@@ -16,7 +16,6 @@ use yii\web\IdentityInterface;
* @property string $password_reset_token
* @property string $email
* @property string $auth_key
* @property integer $role
* @property integer $status
* @property integer $created_at
* @property integer $updated_at
......@@ -26,7 +25,6 @@ class User extends ActiveRecord implements IdentityInterface
{
const STATUS_DELETED = 0;
const STATUS_ACTIVE = 10;
const ROLE_USER = 10;
/**
* @inheritdoc
......@@ -54,9 +52,6 @@ class User extends ActiveRecord implements IdentityInterface
return [
['status', 'default', 'value' => self::STATUS_ACTIVE],
['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]],
['role', 'default', 'value' => self::ROLE_USER],
['role', 'in', 'range' => [self::ROLE_USER]],
];
}
......
......@@ -20,7 +20,6 @@ class m130524_201442_init extends Migration
'password_hash' => Schema::TYPE_STRING . ' NOT NULL',
'password_reset_token' => Schema::TYPE_STRING,
'email' => Schema::TYPE_STRING . ' NOT NULL',
'role' => Schema::TYPE_SMALLINT . ' NOT NULL DEFAULT 10',
'status' => Schema::TYPE_SMALLINT . ' NOT NULL DEFAULT 10',
'created_at' => Schema::TYPE_INTEGER . ' NOT NULL',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment