protected function validate_permission($permission)
 {
     // Check the permission with the backend
     if (!DEBUG && !UserBackend::check_user_permission($this->user, $permission)) {
         throw new AuthorizationException("You do not have the required permissions to perform this operation", ["permission" => $permission]);
     }
     return true;
 }
 public function handleGet($data)
 {
     $profile = UserBackend::fetch_user_profile($this->params["id"]);
     return ["present" => UserBackend::check_user_permission($profile, $this->params["permission"])];
 }