User country mapping; ignore unused groups #443 (#584)

* Fix the user country import #443

* Ignore the old "core" groups because they're unused #443

* Properly sync roles and individual permissions #443
This commit is contained in:
Nabeel S
2020-02-24 15:12:36 -05:00
committed by GitHub
parent 342fe31ceb
commit 11bbcd1df7
4 changed files with 48 additions and 15 deletions

View File

@@ -39,7 +39,7 @@ class RoleService extends Service
{
// Update the permissions, filter out null/invalid values
$perms = collect($permissions)->filter(static function ($v, $k) {
return $v;
return !empty($v);
});
$role->permissions()->sync($perms);