More robust permission mapping for trac and 1.0 support