This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
args: | |
- users | |
- user_roles | |
""" | |
def get_user_roles(self, users, user_roles={}): | |
for user in users: | |
if user in user_roles: | |
continue | |
self.connection.set_url(f'/api/mo/sys/userext/user-{user}.json?rsp-subtree=full') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Admin\Command\AddInterceptFactory; | |
return [ | |
[ | |
'name' => 'addintercept', | |
'route' => '[--authkey=]', | |
'description' => 'Find out all the users that need to intercept to direct the Notification Walled Garden ', | |
'short_description' => 'Add intercept', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Zend\Console\Console; | |
use ZF\Console\Application; | |
use Zend\Console\ColorInterface as Color; | |
use ZF\Console\Dispatcher; | |
use Admin\Forms\NotificationPrimaryInfo; | |
chdir(dirname(__DIR__)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Zend\Expressive\Helper\ServerUrlMiddleware; | |
use Zend\Expressive\Helper\UrlHelperMiddleware; | |
use Zend\Expressive\Middleware\ImplicitHeadMiddleware; | |
use Zend\Expressive\Middleware\ImplicitOptionsMiddleware; | |
use Zend\Expressive\Middleware\NotFoundHandler; | |
use Zend\Stratigility\Middleware\ErrorHandler; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function attach(EventManagerInterface $events) | |
{ | |
$events->attach('dispatch.error', array($this, 'onDispatchError'), 100); | |
} | |
public function onDispatchError($e) | |
{ | |
// $logInfo = [ | |
// 'event' => $e->getRequest()->getServer()->toArray(), | |
// 'error' => $e->getError() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace ispaccount; | |
use ZF\ApiProblem\ApiProblem; | |
use ZF\Apigility\Provider\ApigilityProviderInterface; | |
use Zend\Http\Response\ApiProblemResponse; | |
use Zend\Mvc\MvcEvent; | |
class Module implements ApigilityProviderInterface | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'router' => [ | |
'routes' => [ | |
'ispaccount.rest.ispaccount' => [ | |
'type' => 'Segment', | |
'options' => [ | |
'route' => '/api/ispaccount[/:ispaccount_id]', | |
'constraints' => [ | |
'ispaccount_id' => '[a-zA-Z][a-zA-Z0-9_-]+', | |
], | |
'defaults' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'controllers' => array( | |
'factories' => array( | |
LoginController::class => LoginControllerFactory::class, | |
), | |
// 'invokables' => array( | |
// 'Login\Controller\Login' => 'Login\Controller\LoginController', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Login; | |
use Zend\ModuleManager\Feature\AutoloaderProviderInterface; | |
use Zend\ModuleManager\Feature\ConfigProviderInterface; | |
class Module implements AutoloaderProviderInterface, ConfigProviderInterface | |
{ | |
public function getAutoloaderConfig() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tarr = array( | |
'controllers' => array( | |
'invokables' => array( | |
'Login\Controller\Login' => 'Login\Controller\LoginController', | |
), | |
), | |
// The following section is new and should be added to your file | |
'router' => array( | |
'routes' => array( |
NewerOlder