Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rng
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
rng
Commits
fcc1c7ae
Commit
fcc1c7ae
authored
9 years ago
by
dpi
Browse files
Options
Downloads
Patches
Plain Diff
Remove reference to deprecated isTemplate method.
parent
dcb7a8b3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rng.module
+2
-4
2 additions, 4 deletions
rng.module
with
2 additions
and
4 deletions
rng.module
+
2
−
4
View file @
fcc1c7ae
...
@@ -5,6 +5,7 @@ use Drupal\Core\Entity\EntityInterface;
...
@@ -5,6 +5,7 @@ use Drupal\Core\Entity\EntityInterface;
use
Drupal\Core\Session\AccountInterface
;
use
Drupal\Core\Session\AccountInterface
;
use
Drupal\Core\Access\AccessResult
;
use
Drupal\Core\Access\AccessResult
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\courier\ChannelInterface
;
use
Drupal\rng\Entity\RuleSchedule
;
use
Drupal\rng\Entity\RuleSchedule
;
use
Drupal\rng\Entity\Registrant
;
use
Drupal\rng\Entity\Registrant
;
use
Drupal\rng\Exception\InvalidEventException
;
use
Drupal\rng\Exception\InvalidEventException
;
...
@@ -43,10 +44,7 @@ function rng_entity_access(EntityInterface $entity, $operation, AccountInterface
...
@@ -43,10 +44,7 @@ function rng_entity_access(EntityInterface $entity, $operation, AccountInterface
}
}
if
(
$operation
==
'update'
)
{
if
(
$operation
==
'update'
)
{
/** @var \Drupal\courier\IdentityChannelManagerInterface $identity_channel_manager */
if
(
$entity
instanceof
ChannelInterface
)
{
$identity_channel_manager
=
\Drupal
::
service
(
'plugin.manager.identity_channel'
);
if
(
$identity_channel_manager
->
isTemplate
(
$entity
))
{
/** @var $entity \Drupal\courier\ChannelInterface */
if
(
$template_collection
=
TemplateCollection
::
getTemplateCollectionForTemplate
(
$entity
))
{
if
(
$template_collection
=
TemplateCollection
::
getTemplateCollectionForTemplate
(
$entity
))
{
// Allow editing template if the user has 'manage event' for the event.
// Allow editing template if the user has 'manage event' for the event.
return
AccessResult
::
allowedIf
((
$owner
=
$template_collection
->
getOwner
())
&&
$owner
->
access
(
'manage event'
))
return
AccessResult
::
allowedIf
((
$owner
=
$template_collection
->
getOwner
())
&&
$owner
->
access
(
'manage event'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment