Slider 6.2 sécurité de profil
This commit is contained in:
parent
73e6dae14e
commit
cc0c098ea8
@ -1,3 +1,5 @@
|
||||
# Version 6.2
|
||||
- Applique les profils
|
||||
# Version 6.1
|
||||
- Corrige le calcul de la largeur lorsque la largeur de l'écran est de 100%
|
||||
# Version 6.0
|
||||
|
@ -27,7 +27,7 @@ class slider extends common
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
const VERSION = '6.1';
|
||||
const VERSION = '6.2';
|
||||
const REALNAME = 'Carrousel';
|
||||
const DELETE = true;
|
||||
const UPDATE = '0.0';
|
||||
@ -266,20 +266,15 @@ class slider extends common
|
||||
{
|
||||
// $url prend l'adresse sans le token
|
||||
// La galerie n'existe pas
|
||||
if ($this->getData(['module', $this->getUrl(0), $this->getUrl(2)]) === null) {
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true ||
|
||||
$this->getData(['module', $this->getUrl(0), $this->getUrl(2)]) === null
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'notification' => 'Suppression non autorisée'
|
||||
]);
|
||||
}
|
||||
// Suppression
|
||||
else {
|
||||
$this->deleteData(['module', $this->getUrl(0), $this->getUrl(2)]);
|
||||
@ -311,7 +306,10 @@ class slider extends common
|
||||
public function theme()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if ($this->isPost()) {
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
|
||||
// Equilibrer les durées
|
||||
$speed = $this->getInput('sliderThemespeed', helper::FILTER_INT);
|
||||
|
Loading…
Reference in New Issue
Block a user