Merge "Use same logic to check BAL permission" into main