@@ -70,28 +70,28 @@ |
||
70 | 70 | |
71 | 71 | protected $externalAdapter; |
72 | 72 | |
73 | - /** |
|
74 | - * IndexController constructor. |
|
75 | - * |
|
76 | - * @param AuthenticationService $auth |
|
77 | - * @param LoggerInterface $logger |
|
78 | - * @param $userLoginAdapter |
|
79 | - * @param $locale |
|
80 | - * @param $urlHelper |
|
81 | - * @param array $forms |
|
82 | - * @param $options |
|
83 | - */ |
|
73 | + /** |
|
74 | + * IndexController constructor. |
|
75 | + * |
|
76 | + * @param AuthenticationService $auth |
|
77 | + * @param LoggerInterface $logger |
|
78 | + * @param $userLoginAdapter |
|
79 | + * @param $locale |
|
80 | + * @param $urlHelper |
|
81 | + * @param array $forms |
|
82 | + * @param $options |
|
83 | + */ |
|
84 | 84 | public function __construct( |
85 | - AuthenticationService $auth, |
|
86 | - LoggerInterface $logger, |
|
87 | - $userLoginAdapter, |
|
88 | - $locale, |
|
89 | - $urlHelper, |
|
90 | - array $forms, |
|
91 | - $options, |
|
92 | - $hybridAuthAdapter, |
|
93 | - $externalAdapter, |
|
94 | - RepositoryService $repositories |
|
85 | + AuthenticationService $auth, |
|
86 | + LoggerInterface $logger, |
|
87 | + $userLoginAdapter, |
|
88 | + $locale, |
|
89 | + $urlHelper, |
|
90 | + array $forms, |
|
91 | + $options, |
|
92 | + $hybridAuthAdapter, |
|
93 | + $externalAdapter, |
|
94 | + RepositoryService $repositories |
|
95 | 95 | ) |
96 | 96 | { |
97 | 97 | $this->auth = $auth; |
@@ -28,66 +28,66 @@ discard block |
||
28 | 28 | */ |
29 | 29 | class ManageController extends AbstractActionController |
30 | 30 | { |
31 | - private $userProfileContainer; |
|
31 | + private $userProfileContainer; |
|
32 | 32 | |
33 | - private $authService; |
|
33 | + private $authService; |
|
34 | 34 | |
35 | - private $socialProfileForm; |
|
35 | + private $socialProfileForm; |
|
36 | 36 | |
37 | - private $translator; |
|
37 | + private $translator; |
|
38 | 38 | |
39 | - private $repositories; |
|
39 | + private $repositories; |
|
40 | 40 | |
41 | - private $viewHelper; |
|
41 | + private $viewHelper; |
|
42 | 42 | |
43 | - private $hybridAuthAdapter; |
|
43 | + private $hybridAuthAdapter; |
|
44 | 44 | |
45 | - /** |
|
46 | - * @param ContainerInterface $container |
|
47 | - * @return ManageController |
|
48 | - */ |
|
49 | - static public function factory(ContainerInterface $container) |
|
50 | - { |
|
51 | - $forms = $container->get('forms'); |
|
52 | - $userProfileContainer = $forms->get('Auth/UserProfileContainer'); |
|
53 | - $socialProfileForm = $forms->get('Auth/SocialProfiles'); |
|
54 | - $authService = $container->get('AuthenticationService'); |
|
55 | - $translator = $container->get('translator'); |
|
56 | - $repositories = $container->get('repositories'); |
|
57 | - $viewHelper = $container->get('ViewHelperManager'); |
|
58 | - $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
|
59 | - $controller = new ManageController( |
|
60 | - $userProfileContainer, |
|
61 | - $authService, |
|
62 | - $repositories, |
|
63 | - $socialProfileForm, |
|
64 | - $translator, |
|
65 | - $viewHelper, |
|
66 | - $hybridAuthAdapter |
|
67 | - ); |
|
68 | - return $controller; |
|
69 | - } |
|
45 | + /** |
|
46 | + * @param ContainerInterface $container |
|
47 | + * @return ManageController |
|
48 | + */ |
|
49 | + static public function factory(ContainerInterface $container) |
|
50 | + { |
|
51 | + $forms = $container->get('forms'); |
|
52 | + $userProfileContainer = $forms->get('Auth/UserProfileContainer'); |
|
53 | + $socialProfileForm = $forms->get('Auth/SocialProfiles'); |
|
54 | + $authService = $container->get('AuthenticationService'); |
|
55 | + $translator = $container->get('translator'); |
|
56 | + $repositories = $container->get('repositories'); |
|
57 | + $viewHelper = $container->get('ViewHelperManager'); |
|
58 | + $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
|
59 | + $controller = new ManageController( |
|
60 | + $userProfileContainer, |
|
61 | + $authService, |
|
62 | + $repositories, |
|
63 | + $socialProfileForm, |
|
64 | + $translator, |
|
65 | + $viewHelper, |
|
66 | + $hybridAuthAdapter |
|
67 | + ); |
|
68 | + return $controller; |
|
69 | + } |
|
70 | 70 | |
71 | - public function __construct( |
|
72 | - UserProfileContainer $userProfileContainer, |
|
73 | - AuthenticationService $authService, |
|
74 | - RepositoryService $repositories, |
|
75 | - SocialProfiles $socialProfileForm, |
|
76 | - Translator $translator, |
|
77 | - HelperPluginManager $viewHelper, |
|
78 | - HybridAuth $hybridAuthAdapter |
|
79 | - ) |
|
80 | - { |
|
81 | - $this->userProfileContainer = $userProfileContainer; |
|
82 | - $this->authService = $authService; |
|
83 | - $this->socialProfileForm = $socialProfileForm; |
|
84 | - $this->repositories = $repositories; |
|
85 | - $this->translator = $translator; |
|
86 | - $this->viewHelper = $viewHelper; |
|
87 | - $this->hybridAuthAdapter = $hybridAuthAdapter; |
|
88 | - } |
|
71 | + public function __construct( |
|
72 | + UserProfileContainer $userProfileContainer, |
|
73 | + AuthenticationService $authService, |
|
74 | + RepositoryService $repositories, |
|
75 | + SocialProfiles $socialProfileForm, |
|
76 | + Translator $translator, |
|
77 | + HelperPluginManager $viewHelper, |
|
78 | + HybridAuth $hybridAuthAdapter |
|
79 | + ) |
|
80 | + { |
|
81 | + $this->userProfileContainer = $userProfileContainer; |
|
82 | + $this->authService = $authService; |
|
83 | + $this->socialProfileForm = $socialProfileForm; |
|
84 | + $this->repositories = $repositories; |
|
85 | + $this->translator = $translator; |
|
86 | + $this->viewHelper = $viewHelper; |
|
87 | + $this->hybridAuthAdapter = $hybridAuthAdapter; |
|
88 | + } |
|
89 | 89 | |
90 | - /** |
|
90 | + /** |
|
91 | 91 | * @return array|JsonModel |
92 | 92 | */ |
93 | 93 | public function profileAction() |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $postData = $form->getOption('use_post_array') ? $_POST : array(); |
122 | 122 | //@TODO: [ZF3] option use_files_array is false by default |
123 | 123 | //$filesData = $form->getOption('use_files_array') ? $_FILES : array(); |
124 | - $filesData = $_FILES; |
|
124 | + $filesData = $_FILES; |
|
125 | 125 | $data = array_merge($postData, $filesData); |
126 | 126 | $form->setData($data); |
127 | 127 |
@@ -37,14 +37,14 @@ |
||
37 | 37 | $this->options['allowName'] = isset($options['allowName']) ? $options['allowName'] : null; |
38 | 38 | } |
39 | 39 | |
40 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
41 | - { |
|
42 | - $auth = $container->get('AuthenticationService'); |
|
43 | - $user = $auth->getUser(); |
|
44 | - $options = $this->options; |
|
45 | - $options['user'] = $user; |
|
46 | - $validator = new UniqueGroupName($options); |
|
40 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
41 | + { |
|
42 | + $auth = $container->get('AuthenticationService'); |
|
43 | + $user = $auth->getUser(); |
|
44 | + $options = $this->options; |
|
45 | + $options['user'] = $user; |
|
46 | + $validator = new UniqueGroupName($options); |
|
47 | 47 | |
48 | - return $validator; |
|
49 | - } |
|
48 | + return $validator; |
|
49 | + } |
|
50 | 50 | } |
@@ -55,8 +55,8 @@ |
||
55 | 55 | { |
56 | 56 | /* @var $options \Applications\Options\ModuleOptions */ |
57 | 57 | $form->get($this->fileName)->setViewHelper('formImageUpload') |
58 | - ->setMaxSize($options->getContactImageMaxSize()) |
|
59 | - ->setAllowedTypes($options->getContactImageMimeType()) |
|
60 | - ->setForm($form); |
|
58 | + ->setMaxSize($options->getContactImageMaxSize()) |
|
59 | + ->setAllowedTypes($options->getContactImageMimeType()) |
|
60 | + ->setForm($form); |
|
61 | 61 | } |
62 | 62 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'info' => array( |
63 | 63 | 'type' => 'Auth/UserInfo', |
64 | 64 | 'property' => true, |
65 | - 'use_post_array' => true |
|
65 | + 'use_post_array' => true |
|
66 | 66 | ), |
67 | 67 | 'image' => array( |
68 | 68 | 'type' => 'Auth/UserImage', |
@@ -56,6 +56,6 @@ |
||
56 | 56 | $form = new static(); |
57 | 57 | $form->forms = $forms->get('FormElementManager'); |
58 | 58 | |
59 | - return $form; |
|
59 | + return $form; |
|
60 | 60 | } |
61 | 61 | } |
@@ -138,14 +138,14 @@ |
||
138 | 138 | if (!$this->test($resource, $privilege)) { |
139 | 139 | $msg = null === $privilege |
140 | 140 | ? sprintf( |
141 | - 'You are not allowed to access resource "%s"', |
|
142 | - is_object($resource) ? $resource->getResourceId() : $resource |
|
143 | - ) |
|
141 | + 'You are not allowed to access resource "%s"', |
|
142 | + is_object($resource) ? $resource->getResourceId() : $resource |
|
143 | + ) |
|
144 | 144 | : sprintf( |
145 | - 'You are not allowed to execute operation "%s" on resource "%s"', |
|
146 | - $privilege, |
|
147 | - is_object($resource) ? $resource->getResourceId() : $resource |
|
148 | - ); |
|
145 | + 'You are not allowed to execute operation "%s" on resource "%s"', |
|
146 | + $privilege, |
|
147 | + is_object($resource) ? $resource->getResourceId() : $resource |
|
148 | + ); |
|
149 | 149 | |
150 | 150 | if ($resource instanceof FileInterface && 0 == strpos($resource->getType(), 'image/')) { |
151 | 151 | throw new UnauthorizedImageAccessException(str_replace('resource', 'image', $msg)); |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | $LINKEDIN_APP_SECRET = getenv('LINKEDIN_APP_SECRET'); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'hybridauth' => array( |
|
9 | + 'hybridauth' => array( |
|
10 | 10 | "Facebook" => array ( |
11 | 11 | "enabled" => true, |
12 | 12 | "keys" => array ( "id" => $FACEBOOK_APP_ID, "secret" => $FACEBOOK_APP_SECRET ), |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | "scope" => '' |
31 | 31 | ), |
32 | 32 | "Google" => array( |
33 | - // see http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html |
|
34 | - "enabled" => false, |
|
35 | - 'keys' => array ( "id" => '###Your Google Client-ID ###', 'secret' => '###Your GitHub Secret###'), |
|
36 | - "scope" => "https://www.googleapis.com/auth/userinfo.profile ". // optional |
|
37 | - "https://www.googleapis.com/auth/userinfo.email" , // optional |
|
38 | - "access_type" => "offline", // optional |
|
39 | - "approval_prompt" => "force", // optional |
|
33 | + // see http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html |
|
34 | + "enabled" => false, |
|
35 | + 'keys' => array ( "id" => '###Your Google Client-ID ###', 'secret' => '###Your GitHub Secret###'), |
|
36 | + "scope" => "https://www.googleapis.com/auth/userinfo.profile ". // optional |
|
37 | + "https://www.googleapis.com/auth/userinfo.email" , // optional |
|
38 | + "access_type" => "offline", // optional |
|
39 | + "approval_prompt" => "force", // optional |
|
40 | 40 | ), |
41 | 41 | |
42 | 42 | |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | ), |
48 | 48 | |
49 | 49 | 'Auth' => array( |
50 | - 'first_login' => array ( |
|
51 | - 'role' => '%%role%%', // role set on the first login. |
|
52 | - 'auth_suffix' => '%%auth.suffix%%', // an auth suffix is needed, if you plan to add external apps. |
|
53 | - ), |
|
54 | - // this allows an external application to use the YAWIK API |
|
55 | - // applications[USERPOSTFIX] => AppKey |
|
50 | + 'first_login' => array ( |
|
51 | + 'role' => '%%role%%', // role set on the first login. |
|
52 | + 'auth_suffix' => '%%auth.suffix%%', // an auth suffix is needed, if you plan to add external apps. |
|
53 | + ), |
|
54 | + // this allows an external application to use the YAWIK API |
|
55 | + // applications[USERPOSTFIX] => AppKey |
|
56 | 56 | 'external_applications' => array( |
57 | 57 | '%%external.app.prefix%%' => '%%external.app.key%%', |
58 | 58 | ), |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | 'view_manager' => [ |
67 | 67 | // Map template to files. Speeds up the lookup through the template stack. |
68 | 68 | 'template_map' => [ |
69 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | - 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
69 | + 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | + 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | + 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | + 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | + 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | + 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | + 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | + 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
77 | 77 | 'organizations/profile/disabled' => __DIR__ . '/../view/organizations/profile/disabled.phtml', |
78 | 78 | ], |
79 | 79 | // Where to look for view templates not mapped above |
@@ -83,21 +83,21 @@ discard block |
||
83 | 83 | ], |
84 | 84 | 'form_elements' => [ |
85 | 85 | 'invokables' => [ |
86 | - 'Organizations/Form' => 'Organizations\Form\Organizations', |
|
87 | - 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
88 | - 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
89 | - 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
90 | - 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
91 | - 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
92 | - //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
93 | - 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
94 | - 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
95 | - 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
96 | - 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
97 | - 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
98 | - 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
99 | - 'Organizations/Profile' => \Organizations\Form\OrganizationsProfileForm::class, |
|
100 | - 'Organizations/ProfileFieldset' => \Organizations\Form\OrganizationsProfileFieldset::class |
|
86 | + 'Organizations/Form' => 'Organizations\Form\Organizations', |
|
87 | + 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
88 | + 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
89 | + 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
90 | + 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
91 | + 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
92 | + //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
93 | + 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
94 | + 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
95 | + 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
96 | + 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
97 | + 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
98 | + 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
99 | + 'Organizations/Profile' => \Organizations\Form\OrganizationsProfileForm::class, |
|
100 | + 'Organizations/ProfileFieldset' => \Organizations\Form\OrganizationsProfileFieldset::class |
|
101 | 101 | ], |
102 | 102 | 'factories' => [ |
103 | 103 | 'Organizations/OrganizationsNameFieldset' => \Organizations\Factory\Form\OrganizationsNameFieldsetFactory::class, |
@@ -212,13 +212,13 @@ discard block |
||
212 | 212 | |
213 | 213 | 'service_manager' => [ |
214 | 214 | 'invokables' => [ |
215 | - 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
215 | + 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
216 | 216 | ], |
217 | 217 | 'factories' => [ |
218 | - 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
219 | - 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
220 | - 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
221 | - 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
218 | + 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
219 | + 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
220 | + 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
221 | + 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
222 | 222 | ], |
223 | 223 | ], |
224 | 224 |