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
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Model registry
Analyze
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
Uni Osnabrück
Stud.IP
Commits
b940d493
Commit
b940d493
authored
3 years ago
by
Ron Lucke
Browse files
Options
Downloads
Patches
Plain Diff
Biest #465
parent
6205adb5
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
lib/classes/JsonApi/Routes/Files/Authority.php
+5
-0
5 additions, 0 deletions
lib/classes/JsonApi/Routes/Files/Authority.php
lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php
+1
-1
1 addition, 1 deletion
lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php
with
6 additions
and
1 deletion
lib/classes/JsonApi/Routes/Files/Authority.php
+
5
−
0
View file @
b940d493
...
...
@@ -38,6 +38,11 @@ class Authority
return
$folder
->
isReadable
(
$user
->
id
);
}
public
static
function
canShowFolderFileRefs
(
User
$user
,
\FolderType
$folder
)
{
return
self
::
canShowFolder
(
$user
,
$folder
)
||
$folder
->
download_allowed
;
}
public
static
function
canUpdateFolder
(
User
$user
,
\FolderType
$folder
)
{
return
$folder
->
isEditable
(
$user
->
id
);
...
...
This diff is collapsed.
Click to expand it.
lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php
+
1
−
1
View file @
b940d493
...
...
@@ -24,7 +24,7 @@ class SubfilerefsIndex extends JsonApiController
throw
new
RecordNotFoundException
();
}
if
(
!
Authority
::
canShowFolder
(
$this
->
getUser
(
$request
),
$folder
))
{
if
(
!
Authority
::
canShowFolder
FileRefs
(
$this
->
getUser
(
$request
),
$folder
))
{
throw
new
AuthorizationFailedException
();
}
...
...
This diff is collapsed.
Click to expand it.
Elmar Ludwig
@elmar
mentioned in commit
studip/studip@41133ff3
·
3 years ago
mentioned in commit
studip/studip@41133ff3
mentioned in commit studip/studip@41133ff3575f2528fb571c45c605543982216d76
Toggle commit list
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