Skip to content

Commit

Permalink
merged fix for MDL-7106, glossary capability check
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Oct 20, 2006
1 parent 0d6d38f commit dc07b83
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mod/glossary/edit.php
Expand Up @@ -38,9 +38,12 @@
$lcase = 'lcase';
}

if (!$glossary->studentcanpost && !has_capability('mod/glossary:manageentries', $context)) {
error("You can't add/edit entries to this glossary!");
if ($e) { // if entry is sepcified
require_capability('mod/glossary:manageentries', $context);
} else { // new entry
require_capability('mod/glossary:write', $context);
}

if ( $confirm ) {
$form = data_submitted();
trusttext_after_edit($form->text, $context);
Expand Down

0 comments on commit dc07b83

Please sign in to comment.