aqhome-cgi: use AQH_ModService_DenyRequest
this function redirects to the login page and then to the requested page.
This commit is contained in:
@@ -166,10 +166,8 @@ int _handleRequest(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, const
|
||||
if (strcasecmp(sLastPathElem, "index.html")==0) {
|
||||
if (AQH_ModService_GetUserPerms(m) & (AQH_MODADM_PERMS_ADMINUSERS | AQH_MODADM_PERMS_ADMINMODULES))
|
||||
rv=_handleRqIndex(m, rq, dbuf);
|
||||
else {
|
||||
AQCGI_Request_SetResponseCode(rq, 403);
|
||||
AQCGI_Request_SetResponseText(rq, "Forbidden");
|
||||
}
|
||||
else
|
||||
AQH_ModService_DenyRequest(m, rq, session, dbuf);
|
||||
}
|
||||
else {
|
||||
AQCGI_Request_SetResponseCode(rq, 404);
|
||||
|
||||
Reference in New Issue
Block a user