From b71847408cbaa2d5eea77a466f5d5018b643e98e Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 13 Sep 2023 10:24:05 +0200 Subject: [PATCH] last changes --- src/client/app/tmpl/home.html | 2 +- .../server/control/TB_Server_Control_Appointment.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/client/app/tmpl/home.html b/src/client/app/tmpl/home.html index 5ac30ac..ba22245 100644 --- a/src/client/app/tmpl/home.html +++ b/src/client/app/tmpl/home.html @@ -9,7 +9,7 @@ <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT1' ) %><%= groupsNotActiveString %>
<%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT2' ) %> - <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_BTN' ) %> + -> <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_BTN' ) %> diff --git a/src/server/server/control/TB_Server_Control_Appointment.php b/src/server/server/control/TB_Server_Control_Appointment.php index 37a102b..9624229 100644 --- a/src/server/server/control/TB_Server_Control_Appointment.php +++ b/src/server/server/control/TB_Server_Control_Appointment.php @@ -862,6 +862,11 @@ class TB_Server_Control_Appointment { throw new \Exception( 'Not visible for current session profile.' ); } + if ( false === $appointment->isAttendableByProfile( $sessionProfile ) ) + { + throw new \Exception( 'Not possible to attend by current profile.' ); + } + //$attendeeData = TB_Shared_Ent_TeamData_Attendee::getWithProfileDataByAppointmentId( $appointment->id ); $attendeeData = TB_Shared_Ent_TeamData_Attendee::getByAppointmentId( $appointment->id ); $attendeeProfiles = array(); @@ -1203,6 +1208,11 @@ class TB_Server_Control_Appointment { throw new \Exception( 'Not visible by current profile.' ); } + if ( false === $appointment->isAttendableByProfile( $sessionProfile ) ) + { + throw new \Exception( 'Not possible to attend by current profile.' ); + } + $status = $params->get( 'status' ); if ( !in_array( $status, TB_Shared_Ent_TeamData_Attendee::getValidStatus() ) ) {