tapatalk Posted February 26, 2021 Share 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? Link to comment Share on other sites More sharing options...
Daniel F Posted February 26, 2021 Share 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 ) Miss_B, DawPi and IPCommerceFan 3 Link to comment Share on other sites More sharing options...
tapatalk Posted February 26, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
CoffeeCake Posted February 26, 2021 Share Posted February 26, 2021 @Pavel Chernitsky Link to comment Share on other sites More sharing options...
Pavel Chernitsky Posted February 28, 2021 Share Posted February 28, 2021 CoffeeCake 1 Link to comment Share on other sites More sharing options...
Recommended Posts