As long as the url has pageid in it, you can get it like this:
using mojoPortal.Business;
using mojoPortal.Business.WebHelpers;
PageSettings currentPage = CacheHelper.GetCurrentPage();
from there you can check page permissions and you can loop through currentPage.Modules find the one with the moduleid and check permissions on it.
Hope it helps,
Joe