Skip to content

Commit

Permalink
Restricted survey creation to $user->rights->opensurvey->write
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgdf committed Jan 5, 2014
1 parent 048e270 commit 0a3a6c0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions htdocs/opensurvey/wizard/choix_autre.php
Expand Up @@ -27,6 +27,9 @@
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");

// Security check
if (!$user->rights->opensurvey->write) accessforbidden ();

/*
* Action
*/
Expand Down
3 changes: 3 additions & 0 deletions htdocs/opensurvey/wizard/choix_date.php
Expand Up @@ -27,6 +27,9 @@
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");

// Security check
if (!$user->rights->opensurvey->write) accessforbidden ();

//le format du sondage est DATE
$_SESSION["formatsondage"] = "D";

Expand Down
4 changes: 3 additions & 1 deletion htdocs/opensurvey/wizard/create_survey.php
Expand Up @@ -27,8 +27,10 @@
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");

$langs->load("opensurvey");
// Security check
if (!$user->rights->opensurvey->write) accessforbidden ();

$langs->load("opensurvey");

// On teste toutes les variables pour supprimer l'ensemble des warnings PHP
// On transforme en entites html les données afin éviter les failles XSS
Expand Down
4 changes: 3 additions & 1 deletion htdocs/opensurvey/wizard/index.php
Expand Up @@ -28,8 +28,10 @@
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");

$langs->load("opensurvey");
// Security check
if (!$user->rights->opensurvey->write) accessforbidden ();

$langs->load("opensurvey");

/*
* View
Expand Down

0 comments on commit 0a3a6c0

Please sign in to comment.