Switch over to newer catalyst libs, update service configs #730
This commit is contained in:
parent
935dc15101
commit
876722ebe7
49 changed files with 1206 additions and 1500 deletions
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Access;
|
||||
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as BaseGenerator;
|
||||
|
||||
class Generator extends BaseGenerator
|
||||
{
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Access;
|
||||
|
||||
use Catalyst\AuthBundle\Service\ACLVoter as BaseVoter;
|
||||
|
||||
class Voter extends BaseVoter
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class CatalystAPIBundle extends Bundle
|
||||
{
|
||||
}
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
|
||||
|
||||
use Catalyst\APIBundle\Connector\Client as APIClient;
|
||||
|
||||
|
||||
class TestAPICommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('api:test-connector-all')
|
||||
->setDescription('Test API connector with all commands.')
|
||||
->setHelp('Test API Connector with all commands.')
|
||||
->addArgument('protocol', InputArgument::REQUIRED, 'protocol')
|
||||
->addArgument('server', InputArgument::REQUIRED, 'server')
|
||||
->addArgument('api_key', InputArgument::REQUIRED, 'api_key')
|
||||
->addArgument('secret_key', InputArgument::REQUIRED, 'secret_key');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$protocol = $input->getArgument('protocol');
|
||||
$server = $input->getArgument('server');
|
||||
$api_key = $input->getArgument('api_key');
|
||||
$secret_key = $input->getArgument('secret_key');
|
||||
|
||||
// api client
|
||||
$api = new APIClient($server, $api_key, $secret_key);
|
||||
$api->setProtocol($protocol);
|
||||
|
||||
// test
|
||||
$api->get('/capi/test');
|
||||
|
||||
// TODO: shift this out of the bundle, since it's project specific
|
||||
|
||||
// warranty register
|
||||
$serial = 'AJ34LJADR12134LKJL5';
|
||||
$plate_num = 'XEN918';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
'plate_number' => $plate_num,
|
||||
'warranty_class' => 'private',
|
||||
'sku' => 'WMEB24CB-CPN00-LX',
|
||||
'date_purchase' => '20181001',
|
||||
'date_expire' => '20191001',
|
||||
'first_name' => 'First',
|
||||
'last_name' => 'Last',
|
||||
'mobile_number' => '09231234567',
|
||||
];
|
||||
//$api->post('/capi/warranties', $params);
|
||||
|
||||
// get all warranties
|
||||
$params = [
|
||||
'order' => 'DESC',
|
||||
'limit' => '5',
|
||||
'start' => '1',
|
||||
];
|
||||
|
||||
//$api->get('/capi/warranties', $params);
|
||||
|
||||
|
||||
// warranty find
|
||||
//$api->get('/capi/warranties/' . $serial);
|
||||
|
||||
// warranty update
|
||||
$id = 86811;
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
'plate_number' => $plate_num,
|
||||
'warranty_class' => 'private',
|
||||
'sku' => 'WMEB24CB-CPN00-LX',
|
||||
'date_purchase' => '20181001',
|
||||
'date_expire' => '20191001',
|
||||
'first_name' => 'First',
|
||||
'last_name' => 'Last',
|
||||
'mobile_number' => '123456789111',
|
||||
];
|
||||
//$api->post('/capi/warranties/'. $id, $params);
|
||||
|
||||
// warranty set privacy policy
|
||||
$id = 86811;
|
||||
$policy_id = 2;
|
||||
$params = [
|
||||
'privacy_policy_id' => $policy_id,
|
||||
];
|
||||
//$api->post('/capi/warranties/' . $id .'/privacypolicy', $params);
|
||||
|
||||
// warranty claim
|
||||
$id = 86811;
|
||||
$serial = 'AJ34LJADR12134LKJL5';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
];
|
||||
//$api->post('/capi/warranties/' . $id . '/claim', $params);
|
||||
|
||||
// warranty cancel
|
||||
$id = 86811;
|
||||
//$api->get('/capi/warranties/' . $id . '/cancel');
|
||||
|
||||
// plate warranty
|
||||
//$api->get('/capi/plates/' . $plate_num . '/warranties');
|
||||
|
||||
// warranty delete
|
||||
$id = 86811;
|
||||
//$api->post('/capi/warranties/' . $id . '/delete');
|
||||
|
||||
// battery
|
||||
//$api->get('/capi/battery_brands');
|
||||
//$api->get('/capi/battery_sizes');
|
||||
//$api->get('/capi/batteries');
|
||||
|
||||
// vehicle
|
||||
//$api->get('/capi/vehicle_manufacturers');
|
||||
//$api->get('/capi/vehicles');
|
||||
|
||||
// privacy policy
|
||||
$privacy_policy_id = 2;
|
||||
//$api->get('/capi/privacy_policy/' . $privacy_policy_id );
|
||||
|
||||
// register new customer
|
||||
$params = [
|
||||
'first_name' => 'Krispups',
|
||||
'last_name' =>'Porzindog',
|
||||
'mobile_number' => '9221111111',
|
||||
'v_make_id' => '22241',
|
||||
'v_model_year' => '2018',
|
||||
'v_plate_number' => 'KPP1234',
|
||||
'v_color' => 'White',
|
||||
'v_condition' => 'new',
|
||||
'v_fuel_type' => 'gas',
|
||||
];
|
||||
//$api->post('/capi/quick_registration', $params);
|
||||
|
||||
// get warranties given list of serial numbers
|
||||
$serial_list = [
|
||||
'AJ34LJADR12134LKJM4',
|
||||
'AJ34LJADR12134LKJL5',
|
||||
'test',
|
||||
];
|
||||
|
||||
$params = [
|
||||
'serial_list' => $serial_list,
|
||||
];
|
||||
|
||||
$api->post('/capi/warranties_list', $params);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
|
||||
|
||||
use Catalyst\APIBundle\Connector\Client as APIClient;
|
||||
|
||||
|
||||
class TestCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('api:test-connector')
|
||||
->setDescription('Test API connector.')
|
||||
->setHelp('Test API Connector.')
|
||||
->addArgument('protocol', InputArgument::REQUIRED, 'protocol')
|
||||
->addArgument('server', InputArgument::REQUIRED, 'server')
|
||||
->addArgument('api_key', InputArgument::REQUIRED, 'api_key')
|
||||
->addArgument('secret_key', InputArgument::REQUIRED, 'secret_key');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$protocol = $input->getArgument('protocol');
|
||||
$server = $input->getArgument('server');
|
||||
$api_key = $input->getArgument('api_key');
|
||||
$secret_key = $input->getArgument('secret_key');
|
||||
|
||||
// api client
|
||||
$api = new APIClient($server, $api_key, $secret_key);
|
||||
$api->setProtocol($protocol);
|
||||
|
||||
// test
|
||||
$api->get('/capi/test');
|
||||
|
||||
// TODO: shift this out of the bundle, since it's project specific
|
||||
|
||||
|
||||
// warranty register
|
||||
$serial = 'AJ34LJADR12134LKJL5';
|
||||
$plate_num = 'XEN918';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
'plate_number' => $plate_num,
|
||||
'warranty_class' => 'private',
|
||||
'sku' => 'WMEB24CB-CPN00-LX',
|
||||
'date_purchase' => '20181001',
|
||||
'date_expire' => '20191001',
|
||||
'first_name' => 'First',
|
||||
'last_name' => 'Last',
|
||||
'mobile_number' => '12345678910',
|
||||
];
|
||||
$api->post('/capi/warranties', $params);
|
||||
|
||||
// get all warranties
|
||||
$api->get('/capi/warranties');
|
||||
|
||||
|
||||
/*
|
||||
// warranty find
|
||||
$api->get('/capi/warranties/' . $serial);
|
||||
*/
|
||||
|
||||
// warranty claim
|
||||
$id = 86811;
|
||||
$serial = 'AJ34LJADR12134LKJL';
|
||||
$params = [
|
||||
'serial' => $serial,
|
||||
];
|
||||
$api->post('/capi/warranties/' . $id . '/claim', $params);
|
||||
|
||||
// add battery
|
||||
$sku = 'WZMB31QT-CPP00-S';
|
||||
$brand_id = '4';
|
||||
$size_id = '1';
|
||||
$params = [
|
||||
'sku' => $sku,
|
||||
'brand_id' => $brand_id,
|
||||
'size_id' => $size_id,
|
||||
];
|
||||
$api->post('/capi/batteries', $params);
|
||||
|
||||
/*
|
||||
|
||||
// plate warranty
|
||||
$api->get('/capi/plates/' . $plate_num . '/warranties');
|
||||
|
||||
// battery
|
||||
$api->get('/capi/battery_brands');
|
||||
$api->get('/capi/battery_sizes');
|
||||
$api->get('/capi/batteries');
|
||||
|
||||
// vehicle
|
||||
// $api->get('/capi/vehicle_manufacturers');
|
||||
// $api->get('/capi/vehicles');
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Entity\User;
|
||||
|
||||
class UserCreateCommand extends Command
|
||||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('api:user-create')
|
||||
->setDescription('Create new API user.')
|
||||
->setHelp('Creates new API user and saves to database.')
|
||||
->addArgument('name', InputArgument::REQUIRED, 'name');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$name = $input->getArgument('name');
|
||||
|
||||
$user = new User();
|
||||
$user->setName($name);
|
||||
|
||||
$this->em->persist($user);
|
||||
$this->em->flush();
|
||||
|
||||
$output->write('API Key - ' . $user->getAPIKey() . "\n");
|
||||
$output->write('Secret Key - ' . $user->getSecretKey() . "\n");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Connector;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class Client
|
||||
{
|
||||
const HEADER_API_KEY = 'X-Cata-API-Key';
|
||||
const HEADER_SIGNATURE = 'X-Cata-Signature';
|
||||
const HEADER_DATE = 'X-Cata-Date';
|
||||
|
||||
const DATE_FORMAT = 'D, d M Y H:i:s T';
|
||||
|
||||
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36';
|
||||
|
||||
protected $protocol;
|
||||
protected $server;
|
||||
protected $port;
|
||||
protected $api_key;
|
||||
protected $secret_key;
|
||||
|
||||
protected $curl;
|
||||
|
||||
public function __construct($server, $api_key, $secret_key)
|
||||
{
|
||||
$this->protocol = 'https';
|
||||
$this->port = null;
|
||||
|
||||
$this->server = $server;
|
||||
$this->api_key = $api_key;
|
||||
$this->secret_key = $secret_key;
|
||||
$this->curl = curl_init();
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
curl_close($this->curl);
|
||||
}
|
||||
|
||||
public function setProtocol($protocol)
|
||||
{
|
||||
if ($protocol != 'http' && $protocol != 'https')
|
||||
return $this;
|
||||
|
||||
$this->protocol = $protocol;
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getDateString()
|
||||
{
|
||||
$date = new DateTime();
|
||||
return $date->format(self::DATE_FORMAT);
|
||||
}
|
||||
|
||||
public function get($url, $params = [])
|
||||
{
|
||||
curl_reset($this->curl);
|
||||
|
||||
$date_string = $this->getDateString();
|
||||
$headers = $this->generateHeaders('GET', $url, $date_string);
|
||||
|
||||
// build query string
|
||||
if (count($params) > 0)
|
||||
$query_string = '?' . http_build_query($params);
|
||||
else
|
||||
$query_string = '';
|
||||
|
||||
// build url
|
||||
if ($this->port == null)
|
||||
$full_url = $this->protocol . '://' . $this->server . $url . $query_string;
|
||||
else
|
||||
$full_url = $this->protocol . '://' . $this->server . ':' . $this->port . $url . $query_string;
|
||||
|
||||
error_log($full_url);
|
||||
|
||||
// curl
|
||||
// curl_setopt($this->curl, CURLOPT_VERBOSE, true);
|
||||
curl_setopt($this->curl, CURLOPT_URL, $full_url);
|
||||
curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($this->curl, CURLOPT_USERAGENT, self::USER_AGENT);
|
||||
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($this->curl, CURLOPT_TIMEOUT, 0);
|
||||
|
||||
$res = curl_exec($this->curl);
|
||||
error_log($res);
|
||||
}
|
||||
|
||||
public function post($url, $params = [])
|
||||
{
|
||||
curl_reset($this->curl);
|
||||
|
||||
$date_string = $this->getDateString();
|
||||
$headers = $this->generateHeaders('POST', $url, $date_string);
|
||||
|
||||
// build query string
|
||||
$query_string = http_build_query($params);
|
||||
|
||||
// build url
|
||||
if ($this->port == null)
|
||||
$full_url = $this->protocol . '://' . $this->server . $url;
|
||||
else
|
||||
$full_url = $this->protocol . '://' . $this->server . ':' . $this->port . $url;
|
||||
|
||||
error_log($full_url);
|
||||
|
||||
// curl
|
||||
// curl_setopt($this->curl, CURLOPT_VERBOSE, true);
|
||||
curl_setopt($this->curl, CURLOPT_URL, $full_url);
|
||||
curl_setopt($this->curl, CURLOPT_POST, true);
|
||||
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $query_string);
|
||||
curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($this->curl, CURLOPT_USERAGENT, self::USER_AGENT);
|
||||
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($this->curl, CURLOPT_TIMEOUT, 0);
|
||||
|
||||
$res = curl_exec($this->curl);
|
||||
error_log($res);
|
||||
}
|
||||
|
||||
protected function generateSignature($method, $url, $date_string)
|
||||
{
|
||||
$creds = [
|
||||
$method,
|
||||
$url,
|
||||
$date_string,
|
||||
$this->secret_key,
|
||||
];
|
||||
$sig_source = implode('|', $creds);
|
||||
|
||||
error_log('SIG SOURCE - ' . $sig_source);
|
||||
|
||||
$raw_sig = hash_hmac('sha1', $sig_source, $this->secret_key, true);
|
||||
$enc_sig = base64_encode($raw_sig);
|
||||
|
||||
return $enc_sig;
|
||||
}
|
||||
|
||||
protected function generateHeaders($method, $url, $date_string)
|
||||
{
|
||||
$sig = $this->generateSignature($method, $url, $date_string);
|
||||
|
||||
$headers = [
|
||||
self::HEADER_API_KEY . ': ' . $this->api_key,
|
||||
self::HEADER_SIGNATURE . ': ' . $sig,
|
||||
self::HEADER_DATE . ': ' . $date_string,
|
||||
];
|
||||
|
||||
return $headers;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
abstract class APIController extends Controller
|
||||
{
|
||||
protected function checkRequiredParameters(Request $req, $params = [])
|
||||
{
|
||||
$missing = [];
|
||||
|
||||
// check if parameters are there
|
||||
foreach ($params as $param)
|
||||
{
|
||||
if ($req->getMethod() == 'GET')
|
||||
{
|
||||
$check = $req->query->get($param);
|
||||
if (empty($check))
|
||||
$missing[] = $param;
|
||||
}
|
||||
// else if ($req->getMethod() == 'POST')
|
||||
else
|
||||
{
|
||||
$check = $req->request->get($param);
|
||||
//if (empty($check))
|
||||
if (!isset($check))
|
||||
$missing[] = $param;
|
||||
}
|
||||
}
|
||||
|
||||
// check missing parameters
|
||||
if (count($missing) > 0)
|
||||
{
|
||||
$miss_string = implode(', ', $missing);
|
||||
return 'Missing required parameter(s): ' . $miss_string;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\DataFixtures;
|
||||
|
||||
use Catalyst\APIBundle\Entity\Role;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
|
||||
class APIRoleFixtures extends Fixture
|
||||
{
|
||||
public function load(ObjectManager $em)
|
||||
{
|
||||
// setup super user account
|
||||
$role = new Role();
|
||||
$role->setID(Role::SUPER_ADMIN)
|
||||
->setName('Super Administrator');
|
||||
$em->persist($role);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Entity;
|
||||
|
||||
use Catalyst\AuthBundle\Entity\Role as BaseRole;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="api_role")
|
||||
* @UniqueEntity("id")
|
||||
* @UniqueEntity("name")
|
||||
*/
|
||||
class Role extends BaseRole
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="User", mappedBy="roles", fetch="EXTRA_LAZY")
|
||||
*/
|
||||
protected $users;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Entity;
|
||||
|
||||
use Catalyst\AuthBundle\Entity\User as BaseUser;
|
||||
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\ORM\Mapping\JoinColumn;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="api_user")
|
||||
*/
|
||||
class User extends BaseUser
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
// api key
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32)
|
||||
*/
|
||||
protected $api_key;
|
||||
|
||||
// secret key
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32)
|
||||
*/
|
||||
protected $secret_key;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=80)
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
// date created
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
protected $date_create;
|
||||
|
||||
// roles
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Role", inversedBy="users")
|
||||
* @ORM\JoinTable(name="api_user_role")
|
||||
*/
|
||||
protected $roles;
|
||||
|
||||
// rider linked to user
|
||||
// NOTE: we're directly linking this only because we don't have to care about other apps using this library
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="App\Entity\Rider", mappedBy="api_user")
|
||||
*/
|
||||
protected $rider;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
protected $metadata;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// generate keys
|
||||
$this->setAPIKey($this->generateAPIKey())
|
||||
->setSecretKey($this->generateSecretKey());
|
||||
|
||||
// set date created
|
||||
$this->date_create = new DateTime();
|
||||
$this->metadata = [];
|
||||
}
|
||||
|
||||
public function getID()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setAPIKey($api_key)
|
||||
{
|
||||
$this->api_key = $api_key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAPIKey()
|
||||
{
|
||||
return $this->api_key;
|
||||
}
|
||||
|
||||
public function setSecretKey($key)
|
||||
{
|
||||
$this->secret_key = $key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSecretKey()
|
||||
{
|
||||
return $this->secret_key;
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getDateCreate()
|
||||
{
|
||||
return $this->date_create;
|
||||
}
|
||||
|
||||
public function getPassword()
|
||||
{
|
||||
// we don't need this for API
|
||||
return 'notneeded';
|
||||
}
|
||||
|
||||
public function getSalt()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getUsername()
|
||||
{
|
||||
// since it's an api, the api key IS the username
|
||||
return $this->api_key;
|
||||
}
|
||||
|
||||
public function eraseCredentials()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public function generateAPIKey()
|
||||
{
|
||||
return $this->generateKey('api');
|
||||
}
|
||||
|
||||
public function generateSecretKey()
|
||||
{
|
||||
return $this->generateKey('secret');
|
||||
}
|
||||
|
||||
public function setMetadata($meta)
|
||||
{
|
||||
$this->metadata = $meta;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMetadata()
|
||||
{
|
||||
if ($this->metadata == null)
|
||||
return [];
|
||||
|
||||
return $this->metadata;
|
||||
}
|
||||
|
||||
protected function generateKey($prefix = '')
|
||||
{
|
||||
return md5(uniqid($prefix, true));
|
||||
}
|
||||
|
||||
public function setRider($rider)
|
||||
{
|
||||
$this->rider = $rider;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRider()
|
||||
{
|
||||
return $this->rider;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Response;
|
||||
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
class APIResponse extends JsonResponse
|
||||
{
|
||||
public function __construct($success = true, $message = '', $data = null, $status = 200, $headers = [])
|
||||
{
|
||||
$data = [
|
||||
'success' => (bool) $success,
|
||||
'message' => (string) $message,
|
||||
'data' => $data,
|
||||
];
|
||||
parent::__construct($data, $status, $headers);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Security;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
|
||||
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class APIKeyAuthenticator implements SimplePreAuthenticatorInterface, AuthenticationFailureHandlerInterface
|
||||
{
|
||||
const HEADER_API_KEY = 'X-Cata-API-Key';
|
||||
const HEADER_SIGNATURE = 'X-Cata-Signature';
|
||||
const HEADER_DATE = 'X-Cata-Date';
|
||||
|
||||
const DATE_FORMAT = 'D, d M Y H:i:s T';
|
||||
|
||||
// 30 minute time limit
|
||||
const TIME_LIMIT = 1800;
|
||||
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
protected function validateSignature($creds, $secret_key)
|
||||
{
|
||||
$elements = [
|
||||
$creds['method'],
|
||||
$creds['uri'],
|
||||
$creds['date'],
|
||||
$secret_key,
|
||||
];
|
||||
$sig_source = implode('|', $elements);
|
||||
|
||||
error_log($sig_source);
|
||||
|
||||
// generate signature
|
||||
$raw_sig = hash_hmac('sha1', $sig_source, $secret_key, true);
|
||||
$enc_sig = base64_encode($raw_sig);
|
||||
|
||||
error_log($enc_sig);
|
||||
|
||||
if ($enc_sig != trim($creds['signature']))
|
||||
throw new CustomUserMessageAuthenticationException('Invalid signature.');
|
||||
|
||||
}
|
||||
|
||||
public function createToken(Request $req, $provider_key)
|
||||
{
|
||||
// api key header
|
||||
$api_key = $req->headers->get(self::HEADER_API_KEY);
|
||||
if ($api_key == null)
|
||||
throw new BadCredentialsException('No API key sent.');
|
||||
|
||||
// check date from headers
|
||||
$hdate_string = $req->headers->get(self::HEADER_DATE);
|
||||
if ($hdate_string == null)
|
||||
throw new BadCredentialsException('No date specified.');
|
||||
|
||||
$hdate = DateTime::createFromFormat(self::DATE_FORMAT, $hdate_string);
|
||||
if ($hdate == null)
|
||||
throw new BadCredentialsException('Invalid date specified.');
|
||||
|
||||
// get number of seconds difference
|
||||
$date_now = new DateTime();
|
||||
$date_diff = abs($date_now->getTimestamp() - $hdate->getTimestamp());
|
||||
|
||||
// time difference is too much
|
||||
if ($date_diff > self::TIME_LIMIT)
|
||||
throw new BadCredentialsException('Clock synchronization error.');
|
||||
|
||||
// signature header
|
||||
$sig = $req->headers->get(self::HEADER_SIGNATURE);
|
||||
if ($sig == null)
|
||||
throw new BadCredentialsException('No signature sent.');
|
||||
|
||||
// credentials
|
||||
$creds = [
|
||||
'api_key' => $api_key,
|
||||
'date' => $hdate_string,
|
||||
'signature' => $sig,
|
||||
'method' => $req->getRealMethod(),
|
||||
'uri' => $req->getPathInfo(),
|
||||
];
|
||||
|
||||
return new PreAuthenticatedToken(
|
||||
'anonymous',
|
||||
$creds,
|
||||
$provider_key
|
||||
);
|
||||
}
|
||||
|
||||
public function supportsToken(TokenInterface $token, $provider_key)
|
||||
{
|
||||
return $token instanceof PreAuthenticatedToken && $token->getProviderKey() === $provider_key;
|
||||
}
|
||||
|
||||
public function authenticateToken(TokenInterface $token, UserProviderInterface $user_provider, $provider_key)
|
||||
{
|
||||
if (!$user_provider instanceof APIKeyUserProvider)
|
||||
{
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
'The user provider must be an instance of APIKeyUserProvider (%s was given).',
|
||||
get_class($user_provider)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$creds = $token->getCredentials();
|
||||
$api_key = $creds['api_key'];
|
||||
$user = $user_provider->getUserByAPIKey($api_key);
|
||||
|
||||
// check if api key is valid
|
||||
if (!$user)
|
||||
throw new CustomUserMessageAuthenticationException('Invalid API Key');
|
||||
|
||||
// check if signature is valid
|
||||
$this->validateSignature($creds, $user->getSecretKey());
|
||||
|
||||
// check if user is enabled
|
||||
if (!$user->isEnabled())
|
||||
{
|
||||
throw new CustomUserMessageAuthenticationException('User account is disabled');
|
||||
}
|
||||
|
||||
// $user = $user_provider->loadUserByUsername($username);
|
||||
|
||||
return new PreAuthenticatedToken(
|
||||
$user,
|
||||
$api_key,
|
||||
$provider_key,
|
||||
$user->getRoles()
|
||||
);
|
||||
}
|
||||
|
||||
public function onAuthenticationFailure(Request $req, AuthenticationException $exception)
|
||||
{
|
||||
$data = [
|
||||
'success' => false,
|
||||
'error' => [
|
||||
'message' => $exception->getMessage(),
|
||||
],
|
||||
];
|
||||
return new JsonResponse($data, 401);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Security;
|
||||
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Entity\User;
|
||||
|
||||
class APIKeyUserProvider implements UserProviderInterface
|
||||
{
|
||||
protected $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function getUserByAPIKey($api_key)
|
||||
{
|
||||
$user = $this->em->getRepository(User::class)->findOneBy(array('api_key' => $api_key));
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function getUsernameForAPIKey($apiKey)
|
||||
{
|
||||
// Look up the username based on the token in the database, via
|
||||
// an API call, or do something entirely different
|
||||
$username = 'test';
|
||||
|
||||
return $username;
|
||||
}
|
||||
|
||||
public function loadUserByUsername($username)
|
||||
{
|
||||
return new User(
|
||||
$username,
|
||||
null,
|
||||
// the roles for the user - you may choose to determine
|
||||
// these dynamically somehow based on the user
|
||||
array('ROLE_API')
|
||||
);
|
||||
}
|
||||
|
||||
public function refreshUser(UserInterface $user)
|
||||
{
|
||||
// this is used for storing authentication in the session
|
||||
// but in this example, the token is sent in each request,
|
||||
// so authentication can be stateless. Throwing this exception
|
||||
// is proper to make things stateless
|
||||
throw new UnsupportedUserException();
|
||||
}
|
||||
|
||||
public function supportsClass($class)
|
||||
{
|
||||
return User::class === $class;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Catalyst\APIBundle\Service;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface;
|
||||
|
||||
class AccessDeniedHandler implements AccessDeniedHandlerInterface
|
||||
{
|
||||
public function handle(Request $req, AccessDeniedException $exception)
|
||||
{
|
||||
$content = $exception->getMessage();
|
||||
|
||||
return new Response($content, 403);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,18 +4,20 @@
|
|||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@gitlab.com:jankstudio-catalyst/auth-bundle.git"
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/api-bundle.git"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@gitlab.com:jankstudio-catalyst/menu-bundle.git"
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/auth-bundle.git"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/menu-bundle.git"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"ext-iconv": "*",
|
||||
"catalyst/auth-bundle": "dev-master",
|
||||
"catalyst/menu-bundle": "dev-master",
|
||||
"composer/package-versions-deprecated": "1.11.99.4",
|
||||
"creof/doctrine2-spatial": "^1.2",
|
||||
"data-dog/audit-bundle": "^0.1.10",
|
||||
|
|
@ -26,6 +28,9 @@
|
|||
"edwinhoksberg/php-fcm": "^1.0",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"hashids/hashids": "^4.1",
|
||||
"jankstudio/catalyst-api-bundle": "dev-master",
|
||||
"jankstudio/catalyst-auth-bundle": "dev-master",
|
||||
"jankstudio/catalyst-menu-bundle": "dev-master",
|
||||
"microsoft/azure-storage-blob": "^1.5",
|
||||
"predis/predis": "^1.1",
|
||||
"sensio/framework-extra-bundle": "^5.1",
|
||||
|
|
@ -65,8 +70,7 @@
|
|||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "src/",
|
||||
"Catalyst\\APIBundle\\": "catalyst/api-bundle/"
|
||||
"App\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
|
|
|||
298
composer.lock
generated
298
composer.lock
generated
|
|
@ -4,90 +4,8 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "5b5acb546514b41ab347ef37b85425c9",
|
||||
"content-hash": "9489b680a355544bdcb0ffa5655418b7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "catalyst/auth-bundle",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/jankstudio-catalyst/auth-bundle.git",
|
||||
"reference": "803e38f58907513c8df30c31d51303b68c645a17"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://gitlab.com/api/v4/projects/jankstudio-catalyst%2Fauth-bundle/repository/archive.zip?sha=803e38f58907513c8df30c31d51303b68c645a17",
|
||||
"reference": "803e38f58907513c8df30c31d51303b68c645a17",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/dbal": "^2.5.12",
|
||||
"doctrine/doctrine-cache-bundle": "~1.2",
|
||||
"php": "^7.0",
|
||||
"symfony/framework-bundle": "~4.0"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "symfony-bundle",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Catalyst\\AuthBundle\\": ""
|
||||
}
|
||||
},
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kendrick Chan",
|
||||
"email": "kc@jankstudio.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://gitlab.com/api/v4/projects/12709261/issues"
|
||||
},
|
||||
"time": "2019-07-01T09:45:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "catalyst/menu-bundle",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/jankstudio-catalyst/menu-bundle.git",
|
||||
"reference": "2cf9a05862fcc6f956da4b095962915e07f14f64"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://gitlab.com/api/v4/projects/jankstudio-catalyst%2Fmenu-bundle/repository/archive.zip?sha=2cf9a05862fcc6f956da4b095962915e07f14f64",
|
||||
"reference": "2cf9a05862fcc6f956da4b095962915e07f14f64",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/dbal": "^2.5.12",
|
||||
"doctrine/doctrine-cache-bundle": "~1.2",
|
||||
"php": "^7.0",
|
||||
"symfony/framework-bundle": "~4.0"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "symfony-bundle",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Catalyst\\MenuBundle\\": ""
|
||||
}
|
||||
},
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kendrick Chan",
|
||||
"email": "kc@jankstudio.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://gitlab.com/api/v4/projects/12712039/issues"
|
||||
},
|
||||
"time": "2019-06-14T09:43:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/package-versions-deprecated",
|
||||
"version": "1.11.99.4",
|
||||
|
|
@ -1069,102 +987,6 @@
|
|||
],
|
||||
"time": "2021-05-06T19:21:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/doctrine-cache-bundle",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/DoctrineCacheBundle.git",
|
||||
"reference": "6bee2f9b339847e8a984427353670bad4e7bdccb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/6bee2f9b339847e8a984427353670bad4e7bdccb",
|
||||
"reference": "6bee2f9b339847e8a984427353670bad4e7bdccb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/cache": "^1.4.2",
|
||||
"doctrine/inflector": "^1.0",
|
||||
"php": "^7.1",
|
||||
"symfony/doctrine-bridge": "^3.4|^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"instaclick/coding-standard": "~1.1",
|
||||
"instaclick/object-calisthenics-sniffs": "dev-master",
|
||||
"instaclick/symfony2-coding-standard": "dev-remaster",
|
||||
"phpunit/phpunit": "^7.0",
|
||||
"predis/predis": "~0.8",
|
||||
"satooshi/php-coveralls": "^1.0",
|
||||
"squizlabs/php_codesniffer": "~1.5",
|
||||
"symfony/console": "^3.4|^4.0",
|
||||
"symfony/finder": "^3.4|^4.0",
|
||||
"symfony/framework-bundle": "^3.4|^4.0",
|
||||
"symfony/phpunit-bridge": "^3.4|^4.0",
|
||||
"symfony/security-acl": "^2.8",
|
||||
"symfony/validator": "^3.4|^4.0",
|
||||
"symfony/yaml": "^3.4|^4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/security-acl": "For using this bundle to cache ACLs"
|
||||
},
|
||||
"type": "symfony-bundle",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Bundle\\DoctrineCacheBundle\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Fabio B. Silva",
|
||||
"email": "fabio.bat.silva@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@hotmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Doctrine Project",
|
||||
"homepage": "http://www.doctrine-project.org/"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Bundle for Doctrine Cache",
|
||||
"homepage": "https://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/DoctrineCacheBundle/issues",
|
||||
"source": "https://github.com/doctrine/DoctrineCacheBundle/tree/1.4.0"
|
||||
},
|
||||
"abandoned": true,
|
||||
"time": "2019-11-29T11:22:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/doctrine-migrations-bundle",
|
||||
"version": "2.2.3",
|
||||
|
|
@ -2480,6 +2302,117 @@
|
|||
},
|
||||
"time": "2020-11-26T19:24:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jankstudio/catalyst-api-bundle",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/api-bundle.git",
|
||||
"reference": "042d16534265adf81ae67c803b1ae8f0a94f3bb6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://gitlab.com/api/v4/projects/jankstudio1%2Fcatalyst-2%2Fapi-bundle/repository/archive.zip?sha=042d16534265adf81ae67c803b1ae8f0a94f3bb6",
|
||||
"reference": "042d16534265adf81ae67c803b1ae8f0a94f3bb6",
|
||||
"shasum": ""
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "symfony-bundle",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Catalyst\\ApiBundle\\": ""
|
||||
}
|
||||
},
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kendrick Chan",
|
||||
"email": "kc@jankstudio.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"source": "https://gitlab.com/jankstudio1/catalyst-2/api-bundle/-/tree/master",
|
||||
"issues": "https://gitlab.com/jankstudio1/catalyst-2/api-bundle/-/issues"
|
||||
},
|
||||
"time": "2022-10-09T14:02:41+08:00"
|
||||
},
|
||||
{
|
||||
"name": "jankstudio/catalyst-auth-bundle",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/auth-bundle.git",
|
||||
"reference": "50f18ac6d4f6198b7bfe888487e0a4009193403e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://gitlab.com/api/v4/projects/jankstudio1%2Fcatalyst-2%2Fauth-bundle/repository/archive.zip?sha=50f18ac6d4f6198b7bfe888487e0a4009193403e",
|
||||
"reference": "50f18ac6d4f6198b7bfe888487e0a4009193403e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"symfony/cache": "^5.0"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "symfony-bundle",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Catalyst\\AuthBundle\\": ""
|
||||
}
|
||||
},
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kendrick Chan",
|
||||
"email": "kc@jankstudio.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"source": "https://gitlab.com/jankstudio1/catalyst-2/auth-bundle/-/tree/master",
|
||||
"issues": "https://gitlab.com/jankstudio1/catalyst-2/auth-bundle/-/issues"
|
||||
},
|
||||
"time": "2022-01-19T16:21:57+08:00"
|
||||
},
|
||||
{
|
||||
"name": "jankstudio/catalyst-menu-bundle",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git@gitlab.com:jankstudio1/catalyst-2/menu-bundle.git",
|
||||
"reference": "9cddeecbbbb7d61868e1b319d9abc8eda4f34ab0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://gitlab.com/api/v4/projects/jankstudio1%2Fcatalyst-2%2Fmenu-bundle/repository/archive.zip?sha=9cddeecbbbb7d61868e1b319d9abc8eda4f34ab0",
|
||||
"reference": "9cddeecbbbb7d61868e1b319d9abc8eda4f34ab0",
|
||||
"shasum": ""
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "symfony-bundle",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Catalyst\\MenuBundle\\": ""
|
||||
}
|
||||
},
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kendrick Chan",
|
||||
"email": "kc@jankstudio.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"source": "https://gitlab.com/jankstudio1/catalyst-2/menu-bundle/-/tree/master",
|
||||
"issues": "https://gitlab.com/jankstudio1/catalyst-2/menu-bundle/-/issues"
|
||||
},
|
||||
"time": "2022-10-07T11:55:32+08:00"
|
||||
},
|
||||
{
|
||||
"name": "laminas/laminas-code",
|
||||
"version": "3.4.1",
|
||||
|
|
@ -8021,8 +7954,9 @@
|
|||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"catalyst/auth-bundle": 20,
|
||||
"catalyst/menu-bundle": 20
|
||||
"jankstudio/catalyst-api-bundle": 20,
|
||||
"jankstudio/catalyst-auth-bundle": 20,
|
||||
"jankstudio/catalyst-menu-bundle": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
|
|
@ -8031,5 +7965,5 @@
|
|||
"ext-iconv": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.0.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||
|
|
@ -11,8 +10,8 @@ return [
|
|||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Catalyst\APIBundle\CatalystAPIBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Catalyst\ApiBundle\CatalystApiBundle::class => ['all' => true],
|
||||
Catalyst\AuthBundle\CatalystAuthBundle::class => ['all' => true],
|
||||
Catalyst\MenuBundle\CatalystMenuBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -42,20 +42,6 @@ services:
|
|||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLGenerator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%app_acl_file%"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLVoter:
|
||||
arguments:
|
||||
$user_class: "App\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\AuthBundle\Service\UserChecker:
|
||||
|
||||
App\Service\FileUploader:
|
||||
arguments:
|
||||
$target_dir: '%image_upload_directory%'
|
||||
|
|
@ -114,50 +100,6 @@ services:
|
|||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyUserProvider:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyAuthenticator:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Command\UserCreateCommand:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestCommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestAPICommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Access\Voter:
|
||||
arguments:
|
||||
$acl_gen: "@Catalyst\\APIBundle\\Access\\Generator"
|
||||
$user_class: "Catalyst\\APIBundle\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\APIBundle\Access\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%api_acl_file%"
|
||||
|
||||
Catalyst\MenuBundle\Menu\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
||||
arguments:
|
||||
$menu_name: "main_menu"
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
|
||||
|
||||
# invoice generator
|
||||
App\Service\InvoiceGenerator\CMBInvoiceGenerator: ~
|
||||
|
||||
|
|
|
|||
616
config/packages/catalyst_auth.yaml
Normal file
616
config/packages/catalyst_auth.yaml
Normal file
|
|
@ -0,0 +1,616 @@
|
|||
catalyst_auth:
|
||||
main:
|
||||
user_entity: "Catalyst\\UserBundle\\Entity\\User"
|
||||
acl_data:
|
||||
- id: dashboard
|
||||
label: Dashboard Access
|
||||
acls:
|
||||
- id: dashboard.menu
|
||||
label: Menu
|
||||
- id: user
|
||||
label: User Access
|
||||
acls:
|
||||
- id: user.menu
|
||||
label: Menu
|
||||
- id: user.list
|
||||
label: List
|
||||
- id: user.add
|
||||
label: Add
|
||||
- id: user.update
|
||||
label: Update
|
||||
- id: user.delete
|
||||
label: Delete
|
||||
- id: user.role.sadmin
|
||||
label: Super Admin Role
|
||||
- id: user.profile
|
||||
label: User Profile
|
||||
- id: role
|
||||
label: Role Access
|
||||
acls:
|
||||
- id: role.menu
|
||||
label: Menu
|
||||
- id: role.list
|
||||
label: List
|
||||
- id: role.add
|
||||
label: Add
|
||||
- id: role.update
|
||||
label: Update
|
||||
- id: role.delete
|
||||
label: Delete
|
||||
- id: apiuser
|
||||
label: API User Access
|
||||
acls:
|
||||
- id: apiuser.menu
|
||||
label: Menu
|
||||
- id: apiuser.list
|
||||
label: List
|
||||
- id: apiuser.add
|
||||
label: Add
|
||||
- id: apiuser.update
|
||||
label: Update
|
||||
- id: apiuser.delete
|
||||
label: Delete
|
||||
- id: apirole
|
||||
label: API Role Access
|
||||
acls:
|
||||
- id: apirole.menu
|
||||
label: Menu
|
||||
- id: apirole.list
|
||||
label: List
|
||||
- id: apirole.add
|
||||
label: Add
|
||||
- id: apirole.update
|
||||
label: Update
|
||||
- id: apirole.delete
|
||||
label: Delete
|
||||
- id: logistics
|
||||
label: Logistics Access
|
||||
acls:
|
||||
- id: logistics.menu
|
||||
label: Menu
|
||||
- id: battery
|
||||
label: Battery Access
|
||||
acls:
|
||||
- id: battery.menu
|
||||
label: Menu
|
||||
- id: battery.list
|
||||
label: List
|
||||
- id: battery.add
|
||||
label: Add
|
||||
- id: battery.update
|
||||
label: Update
|
||||
- id: battery.delete
|
||||
label: Delete
|
||||
- id: bmfg
|
||||
label: Battery Manufacturer Access
|
||||
acls:
|
||||
- id: bmfg.menu
|
||||
label: Menu
|
||||
- id: bmfg.list
|
||||
label: List
|
||||
- id: bmfg.add
|
||||
label: Add
|
||||
- id: bmfg.update
|
||||
label: Update
|
||||
- id: bmfg.delete
|
||||
label: Delete
|
||||
- id: bmodel
|
||||
label: Battery Model Access
|
||||
acls:
|
||||
- id: bmodel.menu
|
||||
label: Menu
|
||||
- id: bmodel.list
|
||||
label: List
|
||||
- id: bmodel.add
|
||||
label: Add
|
||||
- id: bmodel.update
|
||||
label: Update
|
||||
- id: bmodel.delete
|
||||
label: Delete
|
||||
- id: bsize
|
||||
label: Battery Size Access
|
||||
acls:
|
||||
- id: bsize.menu
|
||||
label: Menu
|
||||
- id: bsize.list
|
||||
label: List
|
||||
- id: bsize.add
|
||||
label: Add
|
||||
- id: bsize.update
|
||||
label: Update
|
||||
- id: bsize.delete
|
||||
label: Delete
|
||||
- id: vehicle
|
||||
label: Vehicle Access
|
||||
acls:
|
||||
- id: vehicle.menu
|
||||
label: Menu
|
||||
- id: vehicle.list
|
||||
label: List
|
||||
- id: vehicle.add
|
||||
label: Add
|
||||
- id: vehicle.update
|
||||
label: Update
|
||||
- id: vehicle.delete
|
||||
label: Delete
|
||||
- id: vmfg
|
||||
label: Vehicle Manufacturer Access
|
||||
acls:
|
||||
- id: vmfg.menu
|
||||
label: Menu
|
||||
- id: vmfg.list
|
||||
label: List
|
||||
- id: vmfg.add
|
||||
label: Add
|
||||
- id: vmfg.update
|
||||
label: Update
|
||||
- id: vmfg.delete
|
||||
label: Delete
|
||||
- id: customer
|
||||
label: Customer Access
|
||||
acls:
|
||||
- id: customer.menu
|
||||
label: Menu
|
||||
- id: customer.list
|
||||
label: List
|
||||
- id: customer.add
|
||||
label: Add
|
||||
- id: customer.update
|
||||
label: Update
|
||||
- id: customer.delete
|
||||
label: Delete
|
||||
- id: customer.dpa
|
||||
label: Display DPA
|
||||
|
||||
|
||||
- id: location
|
||||
label: Location Access
|
||||
acls:
|
||||
- id: location.menu
|
||||
label: Menu
|
||||
- id: outlet
|
||||
label: Outlet Access
|
||||
acls:
|
||||
- id: outlet.menu
|
||||
label: Menu
|
||||
- id: outlet.list
|
||||
label: List
|
||||
- id: outlet.add
|
||||
label: Add
|
||||
- id: outlet.update
|
||||
label: Update
|
||||
- id: outlet.delete
|
||||
label: Delete
|
||||
- id: hub
|
||||
label: Hub Access
|
||||
acls:
|
||||
- id: hub.menu
|
||||
label: Menu
|
||||
- id: hub.list
|
||||
label: List
|
||||
- id: hub.add
|
||||
label: Add
|
||||
- id: hub.update
|
||||
label: Update
|
||||
- id: hub.delete
|
||||
label: Delete
|
||||
- id: geofence
|
||||
label: Geofence
|
||||
acls:
|
||||
- id: geofence.menu
|
||||
label: Menu
|
||||
- id: geofence.list
|
||||
label: List
|
||||
- id: geofence.add
|
||||
label: Add
|
||||
- id: geofence.delete
|
||||
label: Delete
|
||||
|
||||
- id: rider
|
||||
label: Rider Access
|
||||
acls:
|
||||
- id: rider.menu
|
||||
label: Menu
|
||||
- id: rider.list
|
||||
label: List
|
||||
- id: rider.add
|
||||
label: Add
|
||||
- id: rider.update
|
||||
label: Update
|
||||
- id: rider.delete
|
||||
label: Delete
|
||||
|
||||
- id: servicecharge
|
||||
label: Service Charge
|
||||
acls:
|
||||
- id: service_charge.menu
|
||||
label: Menu
|
||||
- id: service_charge.list
|
||||
label: List
|
||||
- id: service_charge.add
|
||||
label: Add
|
||||
- id: service_charge.update
|
||||
label: Update
|
||||
- id: service_charge.delete
|
||||
label: Delete
|
||||
|
||||
- id: joborder
|
||||
label: Job Order
|
||||
acls:
|
||||
- id: joborder.menu
|
||||
label: Menu
|
||||
- id: jo_in.list
|
||||
label: Incoming
|
||||
- id: jo_proc.list
|
||||
label: Dispatch
|
||||
- id: jo_proc.unlock
|
||||
label: Dispatch Unlock
|
||||
- id: jo_assign.list
|
||||
label: Rider Assignment
|
||||
- id: jo_assign.unlock
|
||||
label: Rider Assignment Unlock
|
||||
- id: jo_fulfill.list
|
||||
label: Fulfillment
|
||||
- id: jo_open.list
|
||||
label: Open
|
||||
- id: jo_all.list
|
||||
label: View All
|
||||
- id: jo_pdf.list
|
||||
label: PDF
|
||||
- id: jo_open.edit
|
||||
label: Edit
|
||||
- id: joborder.cancel
|
||||
label: Cancel
|
||||
- id: jo_onestep.form
|
||||
label: One-step Process
|
||||
- id: jo_onestep.edit
|
||||
label: One-step Process Edit
|
||||
- id: jo_walkin.form
|
||||
label: Walk-in
|
||||
- id: jo_walkin.edit
|
||||
label: Walk-in Edit
|
||||
- id: jo_autoassign.test
|
||||
label: Autoassign Test
|
||||
- id: jo_hub.list
|
||||
label: Hub View
|
||||
- id: jo_cancel.fulfill
|
||||
label: Fulfill Cancelled JO
|
||||
- id: jo_resq_proc.list
|
||||
label: RESQ Dispatch
|
||||
|
||||
- id: support
|
||||
label: Customer Support Access
|
||||
acls:
|
||||
- id: support.menu
|
||||
label: Menu
|
||||
- id: general.search
|
||||
label: Search
|
||||
- id: warranty.search
|
||||
label: Customer Battery Search
|
||||
- id: warranty.upload
|
||||
label: Warranty Upload
|
||||
|
||||
- id: ticket
|
||||
label: Ticket Access
|
||||
acls:
|
||||
- id: ticket.menu
|
||||
label: Menu
|
||||
- id: ticket.list
|
||||
label: List
|
||||
- id: ticket.add
|
||||
label: Add
|
||||
- id: ticket.update
|
||||
label: Update
|
||||
- id: ticket.delete
|
||||
label: Delete
|
||||
|
||||
- id: promo
|
||||
label: Promo Access
|
||||
acls:
|
||||
- id: promo.menu
|
||||
label: Menu
|
||||
- id: promo.list
|
||||
label: List
|
||||
- id: promo.add
|
||||
label: Add
|
||||
- id: promo.update
|
||||
label: Update
|
||||
- id: promo.delete
|
||||
label: Delete
|
||||
|
||||
- id: report
|
||||
label: Reports
|
||||
acls:
|
||||
- id: report.menu
|
||||
label: Menu
|
||||
- id: report.reject
|
||||
label: Rejection Report
|
||||
- id: report.battery.conflict
|
||||
label: Battery Conflict Report
|
||||
- id: report.popapp.comparison
|
||||
label: Popapp Comparison Report
|
||||
- id: report.meh.customer
|
||||
label: RESQ MEH Customer Report
|
||||
- id: report.warranty.class
|
||||
label: Warranty Class Report
|
||||
- id: report.vehicle.battery.compatibility
|
||||
label: Vehicle Battery Compatibility Report
|
||||
- id: report.warranty.details
|
||||
label: Warranty Details Report
|
||||
- id: report.jo.details
|
||||
label: Job Order Details Report
|
||||
- id: report.jo_events
|
||||
label: Job Order Events Report
|
||||
- id: report.sms_messages
|
||||
label: SMS Messages Report
|
||||
- id: report.jo.auto_assign
|
||||
label: Auto Assigned Job Order Report
|
||||
- id: report.jo.advance_order
|
||||
label: Advance Order Job Order Report
|
||||
- id: report.customer.source
|
||||
label: Customer Source Report
|
||||
- id: report.hub.filter
|
||||
label: Hub Filter Report
|
||||
- id: report.warranty.raffle
|
||||
label: Warranty Raffle Report
|
||||
- id: report.jo.raffle
|
||||
label: JO Raffle Report
|
||||
|
||||
- id: service
|
||||
label: Other Services
|
||||
acls:
|
||||
- id: service.menu
|
||||
label: Menu
|
||||
- id: service.list
|
||||
label: List
|
||||
- id: service.add
|
||||
label: Add
|
||||
- id: service.update
|
||||
label: Update
|
||||
- id: service.delete
|
||||
label: Delete
|
||||
|
||||
- id: partner
|
||||
label: Partners
|
||||
acls:
|
||||
- id: partner.menu
|
||||
label: Menu
|
||||
- id: partner.list
|
||||
label: List
|
||||
- id: partner.add
|
||||
label: Add
|
||||
- id: partner.update
|
||||
label: Update
|
||||
- id: partner.delete
|
||||
label: Delete
|
||||
|
||||
- id: review
|
||||
label: Reviews
|
||||
acls:
|
||||
- id: review.menu
|
||||
label: Menu
|
||||
- id: review.list
|
||||
label: List
|
||||
- id: review.view
|
||||
label: View
|
||||
- id: review.delete
|
||||
label: Delete
|
||||
|
||||
- id: privacypolicy
|
||||
label: Privacy Policy
|
||||
acls:
|
||||
- id: privacy_policy.menu
|
||||
label: Menu
|
||||
- id: privacy_policy.list
|
||||
label: List
|
||||
- id: privacy_policy.add
|
||||
label: Add
|
||||
- id: privacy_policy.update
|
||||
label: Update
|
||||
- id: privacy_policy.delete
|
||||
label: Delete
|
||||
|
||||
- id: warranty
|
||||
label: Warranty
|
||||
acls:
|
||||
- id: warranty.menu
|
||||
label: Menu
|
||||
- id: warranty.list
|
||||
label: List
|
||||
- id: warranty.add
|
||||
label: Add
|
||||
- id: warranty.update
|
||||
label: Update
|
||||
|
||||
- id: staticcontent
|
||||
label: Static Content
|
||||
acls:
|
||||
- id: static_content.menu
|
||||
label: Menu
|
||||
- id: static_content.list
|
||||
label: List
|
||||
- id: static_content.add
|
||||
label: Add
|
||||
- id: static_content.update
|
||||
label: Update
|
||||
- id: static_content.delete
|
||||
label: Delete
|
||||
|
||||
- id: analytics
|
||||
label: Analytics
|
||||
acls:
|
||||
- id: analytics.menu
|
||||
label: Menu
|
||||
- id: analytics.forecast
|
||||
label: Forecasting
|
||||
|
||||
- id: sap_battery
|
||||
label: SAP Battery Access
|
||||
acls:
|
||||
- id: sap_battery.menu
|
||||
label: Menu
|
||||
- id: sap_battery.list
|
||||
label: List
|
||||
- id: sap_battery.add
|
||||
label: Add
|
||||
- id: sap_battery.update
|
||||
label: Update
|
||||
- id: sap_battery.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_brand
|
||||
label: SAP Battery Brand Access
|
||||
acls:
|
||||
- id: sap_brand.menu
|
||||
label: Menu
|
||||
- id: sap_brand.list
|
||||
label: List
|
||||
- id: sap_brand.add
|
||||
label: Add
|
||||
- id: sap_brand.update
|
||||
label: Update
|
||||
- id: sap_brand.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_bsize
|
||||
label: SAP Battery Size Access
|
||||
acls:
|
||||
- id: sap_bsize.menu
|
||||
label: Menu
|
||||
- id: sap_bsize.list
|
||||
label: List
|
||||
- id: sap_bsize.add
|
||||
label: Add
|
||||
- id: sap_bsize.update
|
||||
label: Update
|
||||
- id: sap_bsize.delete
|
||||
label: Delete
|
||||
|
||||
- id: sap_csize
|
||||
label: SAP Battery Container Size Access
|
||||
acls:
|
||||
- id: sap_csize.menu
|
||||
label: Menu
|
||||
- id: sap_csize.list
|
||||
label: List
|
||||
- id: sap_csize.add
|
||||
label: Add
|
||||
- id: sap_csize.update
|
||||
label: Update
|
||||
- id: sap_csize.delete
|
||||
label: Delete
|
||||
|
||||
- id: customer_tag
|
||||
label: Customer Tags Access
|
||||
acls:
|
||||
- id: customer_tag.menu
|
||||
label: Menu
|
||||
- id: customer_tag.list
|
||||
label: List
|
||||
- id: customer_tag.add
|
||||
label: Add
|
||||
- id: customer_tag.update
|
||||
label: Update
|
||||
- id: customer_tag.delete
|
||||
label: Delete
|
||||
|
||||
- id: dealer
|
||||
label: Dealer Access
|
||||
acls:
|
||||
- id: dealer.menu
|
||||
label: Menu
|
||||
- id: dealer.list
|
||||
label: List
|
||||
- id: dealer.add
|
||||
label: Add
|
||||
- id: dealer.update
|
||||
label: Update
|
||||
- id: dealer.delete
|
||||
label: Delete
|
||||
|
||||
- id: database
|
||||
label: Database Access
|
||||
acls:
|
||||
- id: database.menu
|
||||
label: Menu
|
||||
|
||||
- id: ticket_type
|
||||
label: Ticket Type Access
|
||||
acls:
|
||||
- id: ticket_type.menu
|
||||
label: Menu
|
||||
- id: ticket_type.list
|
||||
label: List
|
||||
- id: ticket_type.add
|
||||
label: Add
|
||||
- id: ticket_type.update
|
||||
label: Update
|
||||
- id: ticket_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: subticket_type
|
||||
label: Sub Ticket Type Access
|
||||
acls:
|
||||
- id: subticket_type.menu
|
||||
label: Menu
|
||||
- id: subticket_type.list
|
||||
label: List
|
||||
- id: subticket_type.add
|
||||
label: Add
|
||||
- id: subticket_type.update
|
||||
label: Update
|
||||
- id: subticket_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: emergency_type
|
||||
label: Emergency Type Access
|
||||
acls:
|
||||
- id: emergency_type.menu
|
||||
label: Menu
|
||||
- id: emergency_type.list
|
||||
label: List
|
||||
- id: emergency_type.add
|
||||
label: Add
|
||||
- id: emergency_type.update
|
||||
label: Update
|
||||
- id: emergency_type.delete
|
||||
label: Delete
|
||||
|
||||
- id: ownership_type
|
||||
label: Ownership Type Access
|
||||
acls:
|
||||
- id: ownership_type.menu
|
||||
label: Menu
|
||||
- id: ownership_type.list
|
||||
label: List
|
||||
- id: ownership_type.add
|
||||
label: Add
|
||||
- id: ownership_type.update
|
||||
label: Update
|
||||
- id: ownership_type.delete
|
||||
label: Delete
|
||||
|
||||
api:
|
||||
user_entity: "App\\Entity\\ApiUser"
|
||||
acl_data:
|
||||
- id: api_test
|
||||
label: Test
|
||||
acls:
|
||||
- id: api.test
|
||||
label: Test
|
||||
- id: api_user
|
||||
label: API User Access
|
||||
acls:
|
||||
- id: apiuser.change.password
|
||||
label: Change User Password
|
||||
- id: api_battery
|
||||
label: API Battery Inventory Access
|
||||
acls:
|
||||
- id: apibattery.get.info
|
||||
label: Get Battery Info
|
||||
- id: api_retailer
|
||||
label: API Retailer Access
|
||||
acls:
|
||||
- id: apiretailer.register
|
||||
label: Register Retailer
|
||||
|
||||
268
config/packages/catalyst_menu.yaml
Normal file
268
config/packages/catalyst_menu.yaml
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
catalyst_menu:
|
||||
main:
|
||||
- id: home
|
||||
acl: dashboard.menu
|
||||
label: '[menu.dashboard]'
|
||||
icon: flaticon-line-graph
|
||||
order: 1
|
||||
|
||||
|
||||
- id: user
|
||||
acl: user.menu
|
||||
label: '[menu.user]'
|
||||
icon: flaticon-users
|
||||
order: 2
|
||||
- id: user_list
|
||||
acl: user.list
|
||||
label: '[menu.user.users]'
|
||||
parent: user
|
||||
- id: role_list
|
||||
acl: role.list
|
||||
label: '[menu.user.roles]'
|
||||
parent: user
|
||||
|
||||
- id: apiuser
|
||||
acl: apiuser.menu
|
||||
label: '[menu.apiuser]'
|
||||
icon: flaticon-users
|
||||
order: 3
|
||||
- id: api_user_list
|
||||
acl: apiuser.list
|
||||
label: '[menu.apiuser.users]'
|
||||
parent: apiuser
|
||||
- id: api_role_list
|
||||
acl: apirole.list
|
||||
label: '[menu.apiuser.roles]'
|
||||
parent: apiuser
|
||||
|
||||
- id: logistics
|
||||
acl: logistics.menu
|
||||
label: '[menu.logistics]'
|
||||
icon: fa fa-truck
|
||||
order: 4
|
||||
- id: rider_list
|
||||
acl: rider.list
|
||||
label: '[menu.logistics.riders]'
|
||||
parent: logistics
|
||||
|
||||
- id: battery
|
||||
acl: battery.menu
|
||||
label: '[menu.battery]'
|
||||
icon: fa fa-battery-3
|
||||
order: 5
|
||||
- id: battery_list
|
||||
acl: battery.list
|
||||
label: '[menu.battery.batteries]'
|
||||
parent: battery
|
||||
- id: bmfg_list
|
||||
acl: bmfg.list
|
||||
label: '[menu.battery.manufacturers]'
|
||||
parent: battery
|
||||
- id: bmodel_list
|
||||
acl: bmodel.list
|
||||
label: '[menu.battery.models]'
|
||||
parent: battery
|
||||
- id: bsize_list
|
||||
acl: bsize.list
|
||||
label: '[menu.battery.sizes]'
|
||||
parent: battery
|
||||
- id: promo_list
|
||||
acl: promo.list
|
||||
label: '[menu.battery.promos]'
|
||||
parent: battery
|
||||
|
||||
- id: sapbattery
|
||||
acl: sap_battery.menu
|
||||
label: '[menu.sapbattery]'
|
||||
icon: fa fa-battery
|
||||
order: 6
|
||||
- id: sapbattery_list
|
||||
acl: sap_battery.list
|
||||
label: '[menu.sapbattery.batteries]'
|
||||
parent: sapbattery
|
||||
- id: sapbrand_list
|
||||
acl: sap_brand.list
|
||||
label: '[menu.sapbattery.brands]'
|
||||
parent: sapbattery
|
||||
- id: sapbsize_list
|
||||
acl: sap_bsize.list
|
||||
label: '[menu.sapbattery.sizes]'
|
||||
parent: sapbattery
|
||||
- id: sapcsize_list
|
||||
acl: sap_csize.list
|
||||
label: '[menu.sapbattery.csizes]'
|
||||
parent: sapbattery
|
||||
|
||||
|
||||
- id: vehicle
|
||||
acl: vehicle.menu
|
||||
label: '[menu.vehicle]'
|
||||
icon: fa fa-car
|
||||
order: 7
|
||||
- id: vehicle_list
|
||||
acl: vehicle.list
|
||||
label: '[menu.vehicle.vehicles]'
|
||||
parent: vehicle
|
||||
- id: vmfg_list
|
||||
acl: vmfg.list
|
||||
label: '[menu.vehicle.manufacturers]'
|
||||
parent: vehicle
|
||||
|
||||
- id: location
|
||||
acl: location.menu
|
||||
label: '[menu.location]'
|
||||
icon: fa fa-home
|
||||
order: 8
|
||||
- id: outlet_list
|
||||
acl: outlet.menu
|
||||
label: '[menu.location.outlets]'
|
||||
parent: location
|
||||
- id: hub_list
|
||||
acl: hub.menu
|
||||
label: '[menu.location.hubs]'
|
||||
parent: location
|
||||
- id: dealer_list
|
||||
acl: dealer.list
|
||||
label: '[menu.location.dealers]'
|
||||
parent: location
|
||||
- id: geofence_list
|
||||
acl: geofence.menu
|
||||
label: '[menu.location.geofence]'
|
||||
parent: location
|
||||
|
||||
|
||||
- id: joborder
|
||||
acl: joborder.menu
|
||||
label: '[menu.joborder]'
|
||||
icon: flaticon-calendar-3
|
||||
order: 9
|
||||
- id: jo_in
|
||||
acl: jo_in.list
|
||||
label: '[menu.joborder.incoming]'
|
||||
parent: joborder
|
||||
- id: jo_proc
|
||||
acl: jo_proc.list
|
||||
label: '[menu.joborder.dispatch]'
|
||||
parent: joborder
|
||||
- id: jo_resq_proc
|
||||
acl: jo_resq_proc.list
|
||||
label: '[menu.joborder.resqdispatch]'
|
||||
parent: joborder
|
||||
- id: jo_assign
|
||||
acl: jo_assign.list
|
||||
label: '[menu.joborder.assignment]'
|
||||
parent: joborder
|
||||
- id: jo_fulfill
|
||||
acl: jo_fulfill.list
|
||||
label: '[menu.joborder.fulfillment]'
|
||||
parent: joborder
|
||||
- id: jo_open
|
||||
acl: jo_open.list
|
||||
label: '[menu.joborder.open]'
|
||||
parent: joborder
|
||||
- id: jo_all
|
||||
acl: jo_all.list
|
||||
label: '[menu.joborder.viewall]'
|
||||
parent: joborder
|
||||
- id: jo_hub_view
|
||||
acl: jo_hub.list
|
||||
label: '[menu.joborder.hubview]'
|
||||
parent: joborder
|
||||
|
||||
- id: support
|
||||
acl: support.menu
|
||||
label: '[menu.support]'
|
||||
icon: flaticon-support
|
||||
order: 10
|
||||
- id: customer_list
|
||||
acl: customer.list
|
||||
label: '[menu.support.customers]'
|
||||
parent: support
|
||||
- id: ticket_list
|
||||
acl: ticket.list
|
||||
label: '[menu.support.tickets]'
|
||||
parent: support
|
||||
- id: general_search
|
||||
acl: general.search
|
||||
label: '[menu.support.searxch]'
|
||||
parent: support
|
||||
- id: warranty_search
|
||||
acl: warranty.search
|
||||
label: '[menu.support.warrantysearch]'
|
||||
parent: support
|
||||
- id: privacy_policy_list
|
||||
acl: privacy_policy.list
|
||||
label: '[menu.support.privacypolicy]'
|
||||
parent: support
|
||||
- id: warranty_list
|
||||
acl: warranty.list
|
||||
label: '[menu.support.warranty]'
|
||||
parent: support
|
||||
- id: warranty_upload
|
||||
acl: warranty.upload
|
||||
label: '[menu.support.warrantyupload]'
|
||||
parent: support
|
||||
- id: static_content_list
|
||||
acl: static_content.list
|
||||
label: '[menu.support.staticcontent]'
|
||||
parent: support
|
||||
- id: customertag_list
|
||||
acl: customer_tag.list
|
||||
label: '[menu.support.customertags]'
|
||||
parent: support
|
||||
|
||||
- id: service
|
||||
acl: service.menu
|
||||
label: '[menu.service]'
|
||||
icon: flaticon-squares
|
||||
order: 11
|
||||
- id: service_list
|
||||
acl: service.list
|
||||
label: '[menu.service.services]'
|
||||
parent: service
|
||||
|
||||
- id: partner
|
||||
acl: partner.menu
|
||||
label: '[menu.partner]'
|
||||
icon: flaticon-network
|
||||
order: 12
|
||||
- id: partner_list
|
||||
acl: partner.list
|
||||
label: '[menu.partner.partners]'
|
||||
parent: partner
|
||||
- id: review_list
|
||||
acl: review.list
|
||||
label: '[menu.partner.reviews]'
|
||||
parent: partner
|
||||
|
||||
- id: analytics
|
||||
acl: analytics.menu
|
||||
label: '[menu.analytics]'
|
||||
icon: flaticon-graphic
|
||||
order: 13
|
||||
- id: analytics_forecast_form
|
||||
acl: analytics.forecast
|
||||
label: '[menu.analytics.forecasting]'
|
||||
parent: analytics
|
||||
|
||||
- id: database
|
||||
acl: database.menu
|
||||
label: '[menu.database]'
|
||||
icon: fa fa-database
|
||||
order: 14
|
||||
- id: ticket_type_list
|
||||
acl: ticket_type.menu
|
||||
label: '[menu.database.tickettypes]'
|
||||
parent: database
|
||||
- id: subticket_type_list
|
||||
acl: subticket_type.menu
|
||||
label: '[menu.database.subtickettypes]'
|
||||
parent: database
|
||||
- id: emergency_type_list
|
||||
acl: emergency_type.menu
|
||||
label: '[menu.database.emergencytypes]'
|
||||
parent: database
|
||||
- id: ownership_type_list
|
||||
acl: ownership_type.menu
|
||||
label: '[menu.database.ownershiptypes]'
|
||||
parent: database
|
||||
|
|
@ -9,8 +9,10 @@ security:
|
|||
entity:
|
||||
class: App\Entity\User
|
||||
property: username
|
||||
api_key_user_provider:
|
||||
id: Catalyst\APIBundle\Security\APIKeyUserProvider
|
||||
api_provider:
|
||||
entity:
|
||||
class: Catalyst\UserBundle\Entity\User
|
||||
property: api_key
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
|
|
@ -49,27 +51,30 @@ security:
|
|||
|
||||
warranty_api:
|
||||
pattern: ^\/capi\/
|
||||
provider: api_provider
|
||||
access_denied_handler: Catalyst\ApiBundle\Service\AccessDeniedHandler
|
||||
stateless: true
|
||||
simple_preauth:
|
||||
authenticator: Catalyst\APIBundle\Security\APIKeyAuthenticator
|
||||
provider: api_key_user_provider
|
||||
user_checker: Catalyst\AuthBundle\Service\UserChecker
|
||||
guard:
|
||||
authenticators:
|
||||
- Catalyst\ApiBundle\Security\Authenticator
|
||||
|
||||
new_rider_api:
|
||||
pattern: ^\/rider_api\/
|
||||
provider: api_provider
|
||||
access_denied_handler: Catalyst\ApiBundle\Service\AccessDeniedHandler
|
||||
stateless: true
|
||||
simple_preauth:
|
||||
authenticator: Catalyst\APIBundle\Security\APIKeyAuthenticator
|
||||
provider: api_key_user_provider
|
||||
user_checker: Catalyst\AuthBundle\Service\UserChecker
|
||||
guard:
|
||||
authenticators:
|
||||
- Catalyst\ApiBundle\Security\Authenticator
|
||||
|
||||
third_party_api:
|
||||
pattern: ^\/tapi\/
|
||||
provider: api_provider
|
||||
access_denied_handler: Catalyst\ApiBundle\Service\AccessDeniedHandler
|
||||
stateless: true
|
||||
simple_preauth:
|
||||
authenticator: Catalyst\APIBundle\Security\APIKeyAuthenticator
|
||||
provider: api_key_user_provider
|
||||
user_checker: Catalyst\AuthBundle\Service\UserChecker
|
||||
guard:
|
||||
authenticators:
|
||||
- Catalyst\ApiBundle\Security\Authenticator
|
||||
|
||||
main:
|
||||
provider: user_provider
|
||||
|
|
|
|||
|
|
@ -43,20 +43,6 @@ services:
|
|||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLGenerator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%app_acl_file%"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLVoter:
|
||||
arguments:
|
||||
$user_class: "App\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\AuthBundle\Service\UserChecker:
|
||||
|
||||
App\Service\FileUploader:
|
||||
arguments:
|
||||
$target_dir: '%image_upload_directory%'
|
||||
|
|
@ -115,50 +101,6 @@ services:
|
|||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyUserProvider:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyAuthenticator:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Command\UserCreateCommand:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestCommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestAPICommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Access\Voter:
|
||||
arguments:
|
||||
$acl_gen: "@Catalyst\\APIBundle\\Access\\Generator"
|
||||
$user_class: "Catalyst\\APIBundle\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\APIBundle\Access\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%api_acl_file%"
|
||||
|
||||
Catalyst\MenuBundle\Menu\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
||||
arguments:
|
||||
$menu_name: "main_menu"
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
|
||||
|
||||
# invoice generator
|
||||
App\Service\InvoiceGenerator\ResqInvoiceGenerator: ~
|
||||
|
||||
|
|
|
|||
|
|
@ -43,20 +43,6 @@ services:
|
|||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLGenerator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%app_acl_file%"
|
||||
|
||||
Catalyst\AuthBundle\Service\ACLVoter:
|
||||
arguments:
|
||||
$user_class: "App\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\AuthBundle\Service\UserChecker:
|
||||
|
||||
App\Service\FileUploader:
|
||||
arguments:
|
||||
$target_dir: '%image_upload_directory%'
|
||||
|
|
@ -120,50 +106,6 @@ services:
|
|||
arguments:
|
||||
$redis_client: "@App\\Service\\RedisClientProvider"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyUserProvider:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Security\APIKeyAuthenticator:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
Catalyst\APIBundle\Command\UserCreateCommand:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestCommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Command\TestAPICommand:
|
||||
tags: ['console.command']
|
||||
|
||||
Catalyst\APIBundle\Access\Voter:
|
||||
arguments:
|
||||
$acl_gen: "@Catalyst\\APIBundle\\Access\\Generator"
|
||||
$user_class: "Catalyst\\APIBundle\\Entity\\User"
|
||||
tags: ['security.voter']
|
||||
|
||||
Catalyst\APIBundle\Access\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
$acl_file: "%api_acl_file%"
|
||||
|
||||
Catalyst\MenuBundle\Menu\Generator:
|
||||
arguments:
|
||||
$router: "@router.default"
|
||||
$cache_dir: "%kernel.cache_dir%"
|
||||
$config_dir: "%kernel.root_dir%/../config"
|
||||
|
||||
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
||||
arguments:
|
||||
$menu_name: "main_menu"
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
|
||||
|
||||
# invoice generator
|
||||
App\Service\InvoiceGenerator\ResqInvoiceGenerator: ~
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Entity\User as APIUser;
|
||||
use Catalyst\APIBundle\Entity\Role as APIRole;
|
||||
use Catalyst\ApiBundle\Entity\User as APIUser;
|
||||
use Catalyst\ApiBundle\Entity\Role as APIRole;
|
||||
|
||||
use App\Entity\Rider;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Controller;
|
||||
|
||||
use Catalyst\APIBundle\Entity\Role as APIRole;
|
||||
use Catalyst\APIBundle\Access\Generator as APIACLGenerator;
|
||||
use Catalyst\ApiBundle\Entity\Role as APIRole;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
|
@ -19,7 +19,7 @@ class APIRoleController extends Controller
|
|||
{
|
||||
protected $api_acl_gen;
|
||||
|
||||
public function __construct(APIACLGenerator $api_acl_gen)
|
||||
public function __construct(ACLGenerator $api_acl_gen)
|
||||
{
|
||||
$this->api_acl_gen = $api_acl_gen;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Controller;
|
||||
|
||||
use Catalyst\APIBundle\Entity\User as APIUser;
|
||||
use Catalyst\APIBundle\Entity\Role as APIRole;
|
||||
use Catalyst\ApiBundle\Entity\User as APIUser;
|
||||
use Catalyst\ApiBundle\Entity\Role as APIRole;
|
||||
|
||||
use Doctrine\ORM\Query;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\SAPBattery;
|
||||
use App\Entity\SAPBatterySize;
|
||||
use App\Entity\SAPBatteryBrand;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class BatteryController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Entity\CustomerVehicle;
|
||||
|
|
@ -17,7 +17,7 @@ use App\Entity\Vehicle;
|
|||
|
||||
use App\Service\HashGenerator;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class CustomerController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ use Doctrine\ORM\Query;
|
|||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Service\RisingTideGateway;
|
||||
use App\Service\WarrantyAPILogger;
|
||||
|
|
@ -37,7 +37,7 @@ use App\Ramcar\WarrantySource;
|
|||
|
||||
use DateTime;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
// third party API
|
||||
class CustomerWarrantyController extends APIController
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\Dealer;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class DealerController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\Municipality;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class MunicipalityController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\PrivacyPolicy;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
// third party API
|
||||
class PrivacyPolicyController extends APIController
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\Rider;
|
||||
use App\Entity\JOEvent;
|
||||
|
|
@ -22,7 +22,7 @@ use App\Entity\BatteryModel;
|
|||
use App\Entity\BatterySize;
|
||||
use App\Entity\RiderAPISession;
|
||||
use App\Entity\User;
|
||||
use Catalyst\APIBundle\Entity\User as APIUser;
|
||||
use Catalyst\ApiBundle\Entity\User as APIUser;
|
||||
|
||||
use App\Service\RedisClientProvider;
|
||||
use App\Service\RiderCache;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ namespace App\Controller\CAPI;
|
|||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Doctrine\ORM\Query;
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
class TestController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
use App\Entity\Vehicle;
|
||||
use App\Entity\VehicleManufacturer;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class VehicleController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\Warranty;
|
||||
use App\Entity\BatteryModel;
|
||||
|
|
@ -33,7 +33,7 @@ use App\Ramcar\WarrantySource;
|
|||
|
||||
use DateTime;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
// third party API
|
||||
class WarrantyController extends APIController
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ use Doctrine\ORM\Query;
|
|||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\WarrantySerialQueue;
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ use App\Service\WarrantySerialUploadLogger;
|
|||
|
||||
use DateTime;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
// third party API
|
||||
class WarrantySerialController extends APIController
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
|||
|
||||
use Catalyst\MenuBundle\Annotation\Menu;
|
||||
|
||||
use Catalyst\APIBundle\Entity\User as APIUser;
|
||||
use Catalyst\APIBundle\Entity\Role as APIRole;
|
||||
use Catalyst\ApiBundle\Entity\User as APIUser;
|
||||
use Catalyst\ApiBundle\Entity\Role as APIRole;
|
||||
|
||||
use DateTime;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
use App\Ramcar\APIResult;
|
||||
|
||||
use App\Entity\Vehicle;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class BatteryController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||
|
||||
use CrEOF\Spatial\PHP\Types\Geometry\Point;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Ramcar\WarrantyClass;
|
||||
use App\Ramcar\JOStatus;
|
||||
|
|
@ -59,7 +59,7 @@ use App\Entity\Warranty;
|
|||
use DateTime;
|
||||
use DateInterval;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class JobOrderController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\Promo;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class PromoController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\Service;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class ServiceController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use Catalyst\APIBundle\Controller\APIController;
|
||||
use Catalyst\APIBundle\Response\APIResponse;
|
||||
use Catalyst\ApiBundle\Controller\ApiController;
|
||||
use Catalyst\ApiBundle\Response\APIResponse;
|
||||
|
||||
use App\Entity\VehicleManufacturer;
|
||||
use App\Entity\Vehicle;
|
||||
|
||||
use Catalyst\APIBundle\Access\Generator as ACLGenerator;
|
||||
use Catalyst\AuthBundle\Service\ACLGenerator as ACLGenerator;
|
||||
|
||||
class VehicleController extends APIController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||
use Doctrine\Common\Collections\Criteria;
|
||||
|
||||
use App\Ramcar\JOStatus;
|
||||
use Catalyst\APIBundle\Entity\User as APIUser;
|
||||
use Catalyst\ApiBundle\Entity\User as APIUser;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
|
|
@ -131,7 +131,7 @@ class Rider
|
|||
protected $current_job_order;
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="Catalyst\APIBundle\Entity\User", inversedBy="rider")
|
||||
* @ORM\OneToOne(targetEntity="Catalyst\ApiBundle\Entity\User", inversedBy="rider")
|
||||
* @ORM\JoinColumn(name="api_user_id", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
protected $api_user;
|
||||
|
|
|
|||
18
symfony.lock
18
symfony.lock
|
|
@ -1,10 +1,4 @@
|
|||
{
|
||||
"catalyst/auth-bundle": {
|
||||
"version": "dev-master"
|
||||
},
|
||||
"catalyst/menu-bundle": {
|
||||
"version": "dev-master"
|
||||
},
|
||||
"creof/doctrine2-spatial": {
|
||||
"version": "1.2.0"
|
||||
},
|
||||
|
|
@ -53,9 +47,6 @@
|
|||
"ref": "44d3aa7752dd46f77ba11af2297a25e1dedfb4d0"
|
||||
}
|
||||
},
|
||||
"doctrine/doctrine-cache-bundle": {
|
||||
"version": "1.3.2"
|
||||
},
|
||||
"doctrine/doctrine-fixtures-bundle": {
|
||||
"version": "3.0",
|
||||
"recipe": {
|
||||
|
|
@ -113,6 +104,15 @@
|
|||
"hashids/hashids": {
|
||||
"version": "4.1.0"
|
||||
},
|
||||
"jankstudio/catalyst-api-bundle": {
|
||||
"version": "dev-master"
|
||||
},
|
||||
"jankstudio/catalyst-auth-bundle": {
|
||||
"version": "dev-master"
|
||||
},
|
||||
"jankstudio/catalyst-menu-bundle": {
|
||||
"version": "dev-master"
|
||||
},
|
||||
"jdorn/sql-formatter": {
|
||||
"version": "v1.2.17"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -770,7 +770,8 @@
|
|||
<div id="m_aside_left" class="m-grid__item m-aside-left m-aside-left--skin-dark">
|
||||
<!-- BEGIN: Aside Menu -->
|
||||
<div id="m_ver_menu" class="m-aside-menu m-aside-menu--skin-dark m-aside-menu--submenu-skin-dark" data-menu-vertical="true" data-menu-scrollable="false" data-menu-dropdown-timeout="500">
|
||||
{{ menu.main_menu(main_menu.menu) }}
|
||||
{% set main_menu = menu_get('main') %}
|
||||
{{ menu.main_menu(main_menu) }}
|
||||
</div>
|
||||
<!-- END: Aside Menu -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,36 +2,38 @@
|
|||
{% import _self as menu %}
|
||||
|
||||
<ul class="m-menu__nav m-menu__nav--dropdown-submenu-arrow ">
|
||||
{% for mi in menu_items %}
|
||||
{% if is_granted(mi.getACLKey) %}
|
||||
{% if mi.hasChildren and mi.isSelected %}
|
||||
<li class="m-menu__item m-menu__item--submenu m-menu__item--open m-menu__item--expanded" aria-haspopup="true" data-menu-submenu-toggle="hover">
|
||||
{% elseif mi.hasChildren %}
|
||||
<li class="m-menu__item m-menu__item--submenu" aria-haspopup="true" data-menu-submenu-toggle="hover">
|
||||
{% elseif mi.isSelected %}
|
||||
<li class="m-menu__item m-menu__item--active" aria-haspopup="true" >
|
||||
{% else %}
|
||||
<li class="m-menu__item " aria-haspopup="true" >
|
||||
{% endif %}
|
||||
<a href="{{ mi.getLink }}" class="m-menu__link{% if mi.hasChildren %} m-menu__toggle{% endif %}">
|
||||
<i class="m-menu__link-icon {{ mi.getIcon }}"></i>
|
||||
<span class="m-menu__link-title">
|
||||
<span class="m-menu__link-wrap">
|
||||
<span class="m-menu__link-text">
|
||||
{{ mi.getLabel }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
{% if mi.hasChildren %}
|
||||
<i class="m-menu__ver-arrow la la-angle-right"></i>
|
||||
{% for mi in menu_items %}
|
||||
{% if is_granted(mi.getACLKey) %}
|
||||
{% if mi.hasChildren and mi.isSelected %}
|
||||
<li class="m-menu__item m-menu__item--submenu m-menu__item--open m-menu__item--expanded" aria-haspopup="true" data-menu-submenu-toggle="hover">
|
||||
{% elseif mi.hasChildren %}
|
||||
<li class="m-menu__item m-menu__item--submenu" aria-haspopup="true" data-menu-submenu-toggle="hover">
|
||||
{% elseif mi.isSelected %}
|
||||
<li class="m-menu__item m-menu__item--active" aria-haspopup="true" >
|
||||
{% else %}
|
||||
<li class="m-menu__item " aria-haspopup="true" >
|
||||
{% endif %}
|
||||
</a>
|
||||
{% if mi.hasChildren %}
|
||||
{{ menu.sub_menu(mi.getChildren) }}
|
||||
|
||||
<a href="{{ menu_link(mi) }}" class="m-menu__link{% if mi.hasChildren %} m-menu__toggle{% endif %}">
|
||||
<i class="m-menu__link-icon {{ mi.getIcon }}"></i>
|
||||
<span class="m-menu__link-title">
|
||||
<span class="m-menu__link-wrap">
|
||||
<span class="m-menu__link-text">
|
||||
{{ mi.getLabel }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
{% if mi.hasChildren %}
|
||||
<i class="m-menu__ver-arrow la la-angle-right"></i>
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
{% if mi.hasChildren %}
|
||||
{{ menu.sub_menu(mi.getChildren) }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
||||
|
|
@ -47,7 +49,7 @@
|
|||
{% else %}
|
||||
<li class="m-menu__item " aria-haspopup="true" >
|
||||
{% endif %}
|
||||
<a href="{{ mi.getLink }}" class="m-menu__link ">
|
||||
<a href="{{ menu_link(mi) }}" class="m-menu__link ">
|
||||
<i class="m-menu__link-bullet m-menu__link-bullet--dot">
|
||||
<span></span>
|
||||
</i>
|
||||
|
|
|
|||
|
|
@ -79,3 +79,77 @@ message.battery_brand_allcaps: 'MOTOLITE'
|
|||
message.confirmation_code: 'Your Resq confirmation code is'
|
||||
message.joborder_completed: 'Your Resq job order has been completed.'
|
||||
message.rider_otw: 'A RESQ rider is on his way to you.'
|
||||
|
||||
# menu items
|
||||
menu.dashboard: 'Dashboard'
|
||||
|
||||
menu.user: 'User'
|
||||
menu.user.users: 'Users'
|
||||
menu.user.roles: 'Roles'
|
||||
|
||||
menu.apiuser: 'API User'
|
||||
menu.apiuser.users: 'API Users'
|
||||
menu.apiuser.roles: 'API Roles'
|
||||
|
||||
menu.logistics: 'Logistics'
|
||||
menu.logistics.riders: 'Riders'
|
||||
|
||||
menu.battery: 'Battery'
|
||||
menu.battery.batteries: 'Batteries'
|
||||
menu.battery.manufacturers: 'Manufacturers'
|
||||
menu.battery.models: 'Models'
|
||||
menu.battery.sizes: 'Sizes'
|
||||
menu.battery.promos: 'Promos'
|
||||
|
||||
menu.sapbattery: 'SAP Battery'
|
||||
menu.sapbattery.batteries: 'SAP Batteries'
|
||||
menu.sapbattery.brands: 'SAP Battery Brands'
|
||||
menu.sapbattery.sizes: 'SAP Battery Sizes'
|
||||
menu.sapbattery.csizes: 'SAP Container Sizes'
|
||||
|
||||
menu.vehicle: 'Vehicle'
|
||||
menu.vehicle.vehicles: 'Vehicles'
|
||||
menu.vehicle.manufacturers: 'Manufacturers'
|
||||
|
||||
menu.location: 'Location'
|
||||
menu.location.outlets: 'Outlets'
|
||||
menu.location.hubs: 'Hubs'
|
||||
menu.location.dealers: 'Dealers'
|
||||
menu.location.geofence: 'Geofence'
|
||||
|
||||
menu.joborder: 'Job Order'
|
||||
menu.joborder.incoming: 'Incoming'
|
||||
menu.joborder.dispatch: 'Dispatch'
|
||||
menu.joborder.resqdispatch: 'RESQ Dispatch'
|
||||
menu.joborder.assignment: 'Rider Assignment'
|
||||
menu.joborder.fulfillment: 'Fulfillment'
|
||||
menu.joborder.open: 'Open'
|
||||
menu.joborder.viewall: 'View All'
|
||||
menu.joborder.hubview: 'Hub View'
|
||||
|
||||
menu.support: 'Support'
|
||||
menu.support.customers: 'Customers'
|
||||
menu.support.tickets: 'Tickets'
|
||||
menu.support.search: 'Search'
|
||||
menu.support.warrantysearch: 'Customer Battery Search'
|
||||
menu.support.privacypolicy: 'Privacy Policy'
|
||||
menu.support.warranty: 'Warranty'
|
||||
menu.support.warrantyupload: 'Warranty Upload'
|
||||
menu.support.staticcontent: 'Static Content'
|
||||
menu.support.customertags: 'Customer Tags'
|
||||
|
||||
menu.service: 'Other Services'
|
||||
menu.service.services: 'Services'
|
||||
|
||||
menu.partner: 'Partners'
|
||||
menu.partner.partners: 'Partners'
|
||||
menu.partner.reviews: 'Reviews'
|
||||
|
||||
menu.analytics: 'Analytics'
|
||||
menu.analytics.forecasting: 'Forecasting'
|
||||
|
||||
menu.database: 'Database'
|
||||
menu.database.ticket: 'Ticket Types'
|
||||
menu.database.subticket: 'Sub Ticket Types'
|
||||
menu.database.emergency: 'Emergency Types'
|
||||
menu.database.ownership: 'Ownership Types'
|
||||
Loading…
Reference in a new issue