tapatalk Posted February 26, 2021 Posted February 26, 2021 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?
Daniel F Posted February 26, 2021 Posted February 26, 2021 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 ) DawPi, IPCommerceFan and Miss_B 3
tapatalk Posted February 26, 2021 Author Posted February 26, 2021 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
Recommended Posts