Skip to content
GitLab
Menu
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
59bae882
Commit
59bae882
authored
Jun 23, 2008
by
Nigel McNie
Committed by
Nigel McNie
Jun 23, 2008
Browse files
Correct an access check for deleting interactions after the owner -> admins change.
parent
308a740e
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/interaction/delete.php
View file @
59bae882
...
...
@@ -41,8 +41,8 @@ if (!$group = get_record('group', 'id', $instance->get('group'), 'deleted', 0))
throw
new
GroupNotFoundException
(
get_string
(
'groupnotfound'
,
'group'
,
$id
));
}
$membership
=
user_
can_
access
_group
((
int
)
$group
->
id
);
if
(
!
(
bool
)
(
$membership
&
(
GROUP_MEMBERSHIP_OWNER
|
GROUP_MEMBERSHIP_ADMIN
|
GROUP_MEMBERSHIP_STAFF
))
)
{
$membership
=
group_
user_access
((
int
)
$group
->
id
);
if
(
$membership
!=
'admin'
)
{
throw
new
AccessDeniedException
(
get_string
(
'notallowedtodeleteinteractions'
,
'group'
));
}
...
...
Write
Preview
Supports
Markdown
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