Skip to content

Commit

Permalink
MDL-14591 adding standard access control
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Mar 28, 2009
1 parent 3283378 commit 98335b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions portfolio/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

$cancel = optional_param('cancel', 0, PARAM_RAW);

require_login();

$exporter = null;
$dataid = 0;

Expand Down
3 changes: 3 additions & 0 deletions portfolio/already.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
if (empty($CFG->enableportfolios)) {
print_error('disabled', 'portfolio');
}

require_once($CFG->libdir . '/portfoliolib.php');

require_login();

$dataid = 0;
$currentinfo = null;
if (!$dataid = optional_param('id', '', PARAM_INT) ) {
Expand Down
7 changes: 7 additions & 0 deletions portfolio/file.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<?php
require_once(dirname(dirname(__FILE__)) . '/config.php');

if (empty($CFG->enableportfolios)) {
print_error('disabled', 'portfolio');
}

require_once($CFG->libdir . '/portfoliolib.php');
require_once($CFG->libdir . '/file/stored_file.php');
require_once($CFG->libdir . '/filelib.php');

$id = required_param('id', PARAM_INT);

require_login();

$exporter = portfolio_exporter::rewaken_object($id);
$exporter->verify_rewaken();

Expand Down

0 comments on commit 98335b2

Please sign in to comment.