Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 26, 20213 yr Hello. We are development an IPB app that expose and API to access the forums. It is working fine and we are testing it into a forum that is set as private Members->Groups->Guest->CanAccessSite = disable.Of course with this configuration, a guest user cannot access our furl endpoint sitename.com/apiendpoint.Is there a way we can make some code or configuration that guest can access always that /apiendpoint/* furls? of course our plugin in this case will return to our app that the site is not public and user must login, but we need our api respond that. Any hint?
February 26, 20213 yr Hi, Do you mean real apiendpoints using the IPS REST API or regular own controllers inside app/modules/front/... ? If the latter, then you can use the Application::allowOfflineAccess method to control if the specific page should be accessible even in offline mode. /** * Can view page even when site is offline * * @param \IPS\Application\Module $module The module * @param string $controller The controller * @param string|NULL $do To "do" parameter * @return bool */ public function allowOfflineAccess( \IPS\Application\Module $module, $controller, $do )
February 26, 20213 yr Author Yes was the second case. What i already was looking was for Quote public function allowGuestAccess( \IPS\Application\Module $module, $controller, $do ) Thanks for put me in the right direction