summaryrefslogtreecommitdiff
path: root/includes/controller
diff options
context:
space:
mode:
Diffstat (limited to 'includes/controller')
-rw-r--r--includes/controller/shifttypes_controller.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/controller/shifttypes_controller.php b/includes/controller/shifttypes_controller.php
index 3ceb5c0d..6d061111 100644
--- a/includes/controller/shifttypes_controller.php
+++ b/includes/controller/shifttypes_controller.php
@@ -10,6 +10,19 @@ function shifttype_controller() {
}
function shifttypes_list_controller() {
+ global $privileges, $user;
+
+ if (! in_array('shifttypes', $privileges))
+ redirect('?');
+
+ $shifttypes = ShiftTypes();
+ if ($shifttypes === false)
+ engelsystem_error("Unable to load shifttypes.");
+
+ return array(
+ shifttypes_title(),
+ ShiftTypes_list_view($shifttypes)
+ );
}
/**