Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
fd1c01ff
Commit
fd1c01ff
authored
Jul 14, 2008
by
Richard Mansfield
Browse files
Use group_user_access function in file upload
parent
6339d399
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/upload.php
View file @
fd1c01ff
...
...
@@ -46,6 +46,7 @@ if ($parentfolder) {
$data
->
title
=
$title
;
$data
->
description
=
$description
;
$data
->
tags
=
$tags
;
$data
->
owner
=
null
;
if
(
$institution
)
{
$data
->
institution
=
$institution
;
}
else
if
(
$group
)
{
...
...
@@ -53,7 +54,7 @@ if ($institution) {
require_once
(
get_config
(
'docroot'
)
.
'lib/group.php'
);
if
(
$parentfolder
&&
!
$USER
->
can_edit_artefact
(
artefact_instance_from_id
(
$parentfolder
)))
{
json_reply
(
'local'
,
get_string
(
'cannoteditfolder'
,
'artefact.file'
));
}
else
if
(
!
$parentfolder
&&
!
user_
can_
access
_group
(
$group
))
{
}
else
if
(
!
$parentfolder
&&
!
group_
user_access
(
$group
))
{
json_reply
(
'local'
,
get_string
(
'usernotingroup'
,
'mahara'
));
}
$data
->
group
=
$group
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment