Skip to content

Commit f0f4aef

Browse files
authored
Merge pull request #11 from secultce/develop
Merge develop to master
2 parents 0573373 + 0f4e449 commit f0f4aef

File tree

5 files changed

+43
-1
lines changed

5 files changed

+43
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
use MapasCulturais\App;
4+
5+
$app = App::i();
6+
7+
return [
8+
'module.EventImporter' => [
9+
'enabled' => function () use ($app) {
10+
//Agentes especificos
11+
$agentsPermissions = [29694, 5352, 34866, 28932, 6139,35355,40999,65009,100799,21927,9327,
12+
111866,114694,117511,25535,117458,54351,117447,101124,99846,105602,26250,109559,19133,
13+
40263,110774,119983,40179,114885,14915,36368,18630,18468,26900,36280,5960,43779,95659,
14+
33624,18940];
15+
//se for admin+ do mapa
16+
$admin = $app->user->is("admin");
17+
if (in_array($app->getUser()->profile->id, $agentsPermissions) || $admin) {
18+
return true;
19+
}
20+
}
21+
]
22+
];

compose/common/config.d/plugins.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'EditOpportunityType' => ['namespace' => 'EditOpportunityType'],
1010
'LocationStateCity' => ['namespace' => 'LocationStateCity'],
1111
'MultipleLocalAuth' => ['namespace' => 'MultipleLocalAuth'],
12+
'Recourse' => ['namespace' => 'Recourse'],
1213
'SamplePlugin' => ['namespace' => 'SamplePlugin'],
1314
'SendEmailUser' => ['namespace' => 'SendEmailUser'],
1415
'Report' => ['namespace' => 'Report'],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
use MapasCulturais\App;
4+
5+
$app = App::i();
6+
7+
return [
8+
'module.EventImporter' => [
9+
'enabled' => function () use ($app) {
10+
$agentsPermissions = [29694, 5352, 34866, 28932, 6139,35355,40999,65009,100799,21927,9327,
11+
111866,114694,117511,25535,117458,54351,117447,101124,99846,105602,26250,109559,19133,
12+
40263,110774,119983,40179,114885,14915,36368,18630,18468,26900,36280,5960,43779,95659,
13+
33624,18940];
14+
if (in_array($app->getUser()->profile->id, $agentsPermissions)) {
15+
return true;
16+
}
17+
}
18+
]
19+
];

docker-compose-homolg.yml

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ services:
3838
# arquivos temporários
3939
- ./themes/Ceara/Entities/Opportunity.php:/var/www/html/protected/application/lib/MapasCulturais/Entities/Opportunity.php
4040
- ./themes/Ceara/Controllers/Registration.php:/var/www/html/protected/application/lib/MapasCulturais/Controllers/Registration.php
41+
- ./themes/Ceara/Controllers/Opportunity.php:/var/www/html/protected/application/lib/MapasCulturais/Controllers/Opportunity.php
4142
links:
4243
- db
4344
- redis

plugins/EditRegistration

-1
This file was deleted.

0 commit comments

Comments
 (0)