$roleIds = array_map(function($role) {
return $role->id;
}, $roles);
- $this->jointPermission->newQuery()->whereIn('id', $roleIds)->delete();
+ $this->jointPermission->newQuery()->whereIn('role_id', $roleIds)->delete();
}
/**
$action = end($explodedPermission);
$this->currentAction = $action;
- $nonJointPermissions = ['restrictions', 'image', 'attachment'];
+ $nonJointPermissions = ['restrictions', 'image', 'attachment', 'comment'];
// Handle non entity specific jointPermissions
if (in_array($explodedPermission[0], $nonJointPermissions)) {