Update auth.php
This commit is contained in:
@@ -10,17 +10,20 @@ if (session_status() === PHP_SESSION_NONE) {
|
|||||||
function isAdminPemerintah() {
|
function isAdminPemerintah() {
|
||||||
return (
|
return (
|
||||||
isset($_SESSION['role']) &&
|
isset($_SESSION['role']) &&
|
||||||
$_SESSION['role'] === 'admin_pemerintah'
|
(
|
||||||
|
$_SESSION['role'] === 'admin_pemerintah' ||
|
||||||
|
$_SESSION['role'] === 'admin'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Cek apakah user adalah Admin Rumah Ibadah
|
|
||||||
*/
|
|
||||||
function isAdminIbadah() {
|
function isAdminIbadah() {
|
||||||
return (
|
return (
|
||||||
isset($_SESSION['role']) &&
|
isset($_SESSION['role']) &&
|
||||||
$_SESSION['role'] === 'admin_ibadah'
|
(
|
||||||
|
$_SESSION['role'] === 'admin_ibadah' ||
|
||||||
|
$_SESSION['role'] === 'operator'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user