if (!$password OR ($permissions['adminpermissions'] & CANCONTROLPANEL) OR ($permissions['adminpermissions'] & ISMODERATOR) OR can_moderate($forumid))
{
return true;
}
Remove it, that will force everyone (admins, supermods, and the mods of that forum) to enter the password before they are allowed in.