20 lines
564 B
PHP
20 lines
564 B
PHP
|
<?php
|
||
|
namespace nur\v\vp;
|
||
|
|
||
|
/**
|
||
|
* Class BasicPage: une page authentifiée
|
||
|
*/
|
||
|
class BasicPage extends AInitAuthzPage {
|
||
|
const REQUIRE_AUTH = true;
|
||
|
const REQUIRE_AUTHZ = true;
|
||
|
const REQUIRE_ROLE = null;
|
||
|
const REQUIRE_PERM = null;
|
||
|
|
||
|
function afterConfig(): void {
|
||
|
# initialiser la session avant setup. ainsi, dans les fonction beforeSetup(),
|
||
|
# setup() et afterSetup(), la session est disponible
|
||
|
$this->ensureAuthOrRedirect(static::REQUIRE_AUTH, static::REQUIRE_AUTHZ, static::REQUIRE_ROLE, static::REQUIRE_PERM);
|
||
|
parent::afterConfig();
|
||
|
}
|
||
|
}
|