Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
N
node_authlink
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
node_authlink
Commits
c1cc3040
Commit
c1cc3040
authored
Mar 27, 2019
by
akalam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AccessResult should be cached per user on nodeaccess check.
parent
85ebd510
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/Access/NodeRevisionAccessCheck.php
src/Access/NodeRevisionAccessCheck.php
+6
-2
No files found.
src/Access/NodeRevisionAccessCheck.php
View file @
c1cc3040
...
...
@@ -19,10 +19,14 @@ class NodeRevisionAccessCheck extends NodeRevisionAccessCheckOriginal {
*/
public
function
checkAccess
(
NodeInterface
$node
,
AccountInterface
$account
,
$op
=
'view'
)
{
if
(
!
$node
->
isDefaultRevision
()
&&
node_authlink_node_is_enabled
(
$node
)
&&
node_authlink_check_authlink
(
$node
,
$op
,
$account
))
{
return
AccessResult
::
allowed
();
$result
=
AccessResult
::
allowed
();
}
else
{
$result
=
parent
::
checkAccess
(
$node
,
$account
,
$op
);
}
$result
->
cachePerUser
();
return
parent
::
checkAccess
(
$node
,
$account
,
$op
)
;
return
$result
;
}
}
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