Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
31480dbd
Commit
31480dbd
authored
4 months ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
correct calls to StructualElement::canRead(), fixes #4815
Closes #4815 Merge request
studip/studip!3605
parent
cd04aafb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/courseware/lti.php
+1
-1
1 addition, 1 deletion
app/controllers/courseware/lti.php
lib/classes/globalsearch/GlobalSearchCourseware.php
+1
-1
1 addition, 1 deletion
lib/classes/globalsearch/GlobalSearchCourseware.php
with
2 additions
and
2 deletions
app/controllers/courseware/lti.php
+
1
−
1
View file @
31480dbd
...
@@ -11,7 +11,7 @@ class Courseware_LtiController extends AuthenticatedController
...
@@ -11,7 +11,7 @@ class Courseware_LtiController extends AuthenticatedController
public
function
iframe_action
(
$block_id
)
public
function
iframe_action
(
$block_id
)
{
{
$cw_block
=
\Courseware\Block
::
find
(
$block_id
);
$cw_block
=
\Courseware\Block
::
find
(
$block_id
);
if
(
!
$cw_block
->
container
->
structural_element
->
canRead
(
$GLOBALS
[
'user'
]
->
id
))
{
if
(
!
$cw_block
->
container
->
structural_element
->
canRead
(
User
::
findCurrent
()
))
{
throw
new
AccessDeniedException
();
throw
new
AccessDeniedException
();
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/classes/globalsearch/GlobalSearchCourseware.php
+
1
−
1
View file @
31480dbd
...
@@ -118,7 +118,7 @@ class GlobalSearchCourseware extends GlobalSearchModule implements GlobalSearchF
...
@@ -118,7 +118,7 @@ class GlobalSearchCourseware extends GlobalSearchModule implements GlobalSearchF
{
{
$structural_element
=
StructuralElement
::
find
(
$data
[
'id'
]);
$structural_element
=
StructuralElement
::
find
(
$data
[
'id'
]);
$unit
=
$structural_element
->
findUnit
();
$unit
=
$structural_element
->
findUnit
();
if
(
$unit
&&
$structural_element
->
canRead
(
$GLOBALS
[
'user'
]
))
{
if
(
$unit
&&
$structural_element
->
canRead
(
User
::
findCurrent
()
))
{
$description
=
''
;
$description
=
''
;
if
(
$data
[
'type'
]
===
'cw_structural_elements'
)
{
if
(
$data
[
'type'
]
===
'cw_structural_elements'
)
{
$description
=
self
::
mark
(
$structural_element
->
payload
[
'description'
],
$search
,
true
);
$description
=
self
::
mark
(
$structural_element
->
payload
[
'description'
],
$search
,
true
);
...
...
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