Merge "Correct the method used for permission check" into main