bug #1997: fixed DS user-switching (U-S), first checking party_id instead of ad_conn, since calling ad_conn with (U-S) enabled enters into an infinite loop that makes aolserver die, with (U-S) enabled, permission_p will always get an party_id and in this way avoiding calls to ad_conn