Commit fc8509bf authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/User/' changes from b5db85d5..387e439

387e439 Merge pull request #9 from nWidart-Modules/removed-user-seed
a553de9 Removing user seed, replaced by install command
c1e9981 Merge pull request #8 from nWidart-Modules/changing-create-with-roles
4330a40 Call the create method from same class
908418a Merge pull request #7 from nWidart-Modules/adding-more-default-permissions
feafcb8 Adding roles and user default permissions
180b7f3 Merge pull request #6 from nWidart-Modules/fixing-user-seed-name
019540c Renaming user seeder

git-subtree-dir: Modules/User
git-subtree-split: 387e43948a5dc6f1aa55da7e7b22ee5dfe82b9ad
parent b5db85d5
......@@ -44,6 +44,18 @@ class SentryGroupSeedTableSeeder extends Seeder
'workbench.seed' => true,
'modules.index' => true,
'modules.store' => true,
'roles.index' => true,
'roles.create' => true,
'roles.store' => true,
'roles.edit' => true,
'roles.update' => true,
'roles.destroy' => true,
'users.index' => true,
'users.create' => true,
'users.store' => true,
'users.edit' => true,
'users.update' => true,
'users.destroy' => true,
];
$group->save();
......
......@@ -3,7 +3,7 @@
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class UsersDatabaseSeeder extends Seeder
class UserDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
......@@ -14,8 +14,7 @@ class UsersDatabaseSeeder extends Seeder
{
Model::unguard();
$this->call("Modules\\Session\\Database\\Seeders\\SentryGroupSeedTableSeeder");
$this->call("Modules\\Session\\Database\\Seeders\\SentryUserSeedTableSeeder");
$this->call("Modules\\User\\Database\\Seeders\\SentryGroupSeedTableSeeder");
}
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ use Modules\User\Repositories\UserRepository;
class SentinelUserRepository implements UserRepository
{
/**
* @var \Modules\Session\Entities\User
* @var \Modules\User\Entities\User
*/
protected $user;
/**
......@@ -49,7 +49,7 @@ class SentinelUserRepository implements UserRepository
*/
public function createWithRoles($data, $roles)
{
$user = $this->user->create($data);
$user = $this->create((array) $data);
if (!empty($roles)) {
$user->roles()->attach($roles);
......
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