Trim leading/trailing spaces from values before using them for comparisons in permissions tests