Thread:Project:Support desk/Permission to edit pages only if that user belongs to that group/reply (6)

in the  section, you've given "YYY" and "XXX" as the group names, but in the   section, you've given "yyy" and "xxx". Group names are case sensitive, so you have four different groups.

Also, I recommend using "YYY" and "XXX" instead of the lower-case versions for your namespace names.