Answer the question
In order to leave comments, you need to log in
Where should the access check code be in the controller or model?
//checking is the driver? on success true
public static function isDriver() {
return Security::isAllowedForCurrentUser('trips_driver');
}
public static function isSecretary() {
return Security::isAllowedForCurrentUser('trips_secretary');
}
ps Called only in the controller.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question