guifi·net GitLab devops
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ramon Roca
drupal9-guifi-networks
Commits
d18f5a62
Commit
d18f5a62
authored
2 years ago
by
Daniel Ortega Martínez
Browse files
Options
Download
Email Patches
Plain Diff
Revert "Merge branch 'develop' into 'ci'"
This reverts merge request
!47
parent
68b36244
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/modules/custom/emergya/src/Services/AccessControl.php
+0
-12
web/modules/custom/emergya/src/Services/AccessControl.php
web/modules/custom/emergya_relation_groups/emergya_relation_groups.module
+0
-3
...om/emergya_relation_groups/emergya_relation_groups.module
with
0 additions
and
15 deletions
+0
-15
web/modules/custom/emergya/src/Services/AccessControl.php
View file @
d18f5a62
...
...
@@ -100,18 +100,6 @@ public function _getZones($account){
return
$zonas
;
}
public
function
is_zone
(
$account
,
$drop
){
$zone_drop
=
$drop
->
get
(
'field_drop_location'
)
->
getValue
()[
0
][
'target_id'
];
$group_zones_allowed
=
$this
->
_getZones
(
$account
);
if
(
in_array
(
$zone_drop
,
$group_zones_allowed
))
{
return
true
;
}
else
{
return
false
;
}
return
false
;
}
public
function
isFunder
(
$drop
){
if
(
is_object
(
$drop
))
{
$memberGroups
=
$this
->
_getMemberGroup
(
$this
->
currentUser
);
...
...
This diff is collapsed.
Click to expand it.
web/modules/custom/emergya_relation_groups/emergya_relation_groups.module
View file @
d18f5a62
...
...
@@ -401,9 +401,6 @@ function emergya_relation_groups_preprocess_views_view_field(&$variables)
if
(
!
$access_service
->
isFunder
(
$drop
)
&&
in_array
(
'provider'
,
\
Drupal
::
currentUser
()
->
getRoles
())
&&
!
in_array
(
'installer'
,
\
Drupal
::
currentUser
()
->
getRoles
())
){
$variables
[
'output'
]
=
''
;
}
elseif
(
!
$access_service
->
isFunder
(
$drop
)
&&
in_array
(
'provider'
,
\
Drupal
::
currentUser
()
->
getRoles
())
&&
in_array
(
'installer'
,
\
Drupal
::
currentUser
()
->
getRoles
())
&&
!
$access_service
->
is_zone
(
\
Drupal
::
currentUser
(),
$drop
)){
$variables
[
'output'
]
=
''
;
}
/*
elseif (in_array('installer', \Drupal::currentUser()->getRoles())){
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help