m3 Security Fixes
This commit is contained in:
@@ -4,24 +4,26 @@ namespace Modules\M3\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Config;
|
||||
|
||||
class ICM428M extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $connection = 'pgsql';
|
||||
protected $table;
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
public function __construct(){
|
||||
protected $table;
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->table = 'ICM428M';
|
||||
}
|
||||
|
||||
# R428DV R428PL R428WHS R428STS R428US R428FIRST R428FAMILY R428EMPCDE R428ADMUSR R428PWRUSR -->
|
||||
// R428DV R428PL R428WHS R428STS R428US R428FIRST R428FAMILY R428EMPCDE R428ADMUSR R428PWRUSR -->
|
||||
protected $fillable = [
|
||||
'R428CO', 'R428PL', 'R428WH', 'R428STS', 'R428US', 'R428FIRST', 'R428FAMILY', 'R428EMPCDE', 'R428ADMUSR', 'R428PWRUSR'
|
||||
'R428CO', 'R428PL', 'R428WH', 'R428STS', 'R428US', 'R428FIRST', 'R428FAMILY', 'R428EMPCDE', 'R428ADMUSR', 'R428PWRUSR',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -4,23 +4,25 @@ namespace Modules\M3\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Config;
|
||||
|
||||
class ICM658M extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $connection = 'pgsql';
|
||||
protected $table;
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
public function __construct(){
|
||||
protected $table;
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->table = 'ICM658M';
|
||||
}
|
||||
|
||||
protected $fillable = [
|
||||
'R658CO', 'R658PL', 'R658WH', 'R658LC', 'R658PN', 'R658MQ', 'R658RQ', 'R658TL','R658RMQ','R658IZLCF'
|
||||
'R658CO', 'R658PL', 'R658WH', 'R658LC', 'R658PN', 'R658MQ', 'R658RQ', 'R658TL', 'R658RMQ', 'R658IZLCF',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2,16 +2,18 @@
|
||||
|
||||
namespace Modules\M3\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Config;
|
||||
|
||||
class ShipTo extends Model
|
||||
{
|
||||
protected $table = 'ICM665M';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $primaryKey = ['AUSHSHZP', 'AUSHWHS'];
|
||||
|
||||
protected $uniqueKey = ['AUSHSHZP', 'AUSHWHS'];
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
@@ -23,7 +25,7 @@ class ShipTo extends Model
|
||||
'AUSHSHST',
|
||||
'AUSHSHZP',
|
||||
'AUSHSHCT',
|
||||
'AUSHWHS'
|
||||
'AUSHWHS',
|
||||
];
|
||||
|
||||
public function save(array $options = [])
|
||||
@@ -42,11 +44,11 @@ class ShipTo extends Model
|
||||
{
|
||||
$query = self::query();
|
||||
|
||||
# Check if the combination of AUSHSHZP and AUSHWHS already exists
|
||||
// Check if the combination of AUSHSHZP and AUSHWHS already exists
|
||||
$existingRecord = $query->where('AUSHSHZP', $this->AUSHSHZP)
|
||||
->where('AUSHWHS', $this->AUSHWHS);
|
||||
|
||||
# If this is an existing record being updated, exclude itself from the check
|
||||
// If this is an existing record being updated, exclude itself from the check
|
||||
if ($this->exists) {
|
||||
$existingRecord->where($this->getKeyName(), '!=', $this->getKey());
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Modules\M3\Models;
|
||||
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
Reference in New Issue
Block a user