diff --git a/lib/blocklib.php b/lib/blocklib.php index 6787a37edf6..0aa7f80c32c 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -880,7 +880,7 @@ class block_manager { confirm_sesskey(); - if ($this->page->user_can_edit_blocks()) { + if (!$this->page->user_can_edit_blocks()) { throw new moodle_exception('nopermissions', '', $this->page->url->out(), get_string('addblock')); }