nerds-and-company / schematic

Craft Setup Sync
MIT License
136 stars 15 forks source link

assignUserGroup not synced #150

Closed Zae closed 6 years ago

Zae commented 6 years ago

Hi,

I noticed that if you assign a userGroup the rights to assign new usergroups these rights are not correctly written to the schematic file, it appears to add a couple of - '' to the file but not the groups.

I added the following case to the Sources::getSource method. which appears to fix the problem, however, github won't allow me to send pull requests to tags and as this fix is for the craft 2 version @ tag 3.8. I don't know if the bug still exists on ^4.0 and where the file is in that new version.

Sources::getSource

case 'assignUserGroup':
              $service = Craft::app()->userGroups;
              $method = 'getGroupBy';
              break;
bvangennep commented 6 years ago

@Zae I've created a craft2 branch you can use to base the PR on

Zae commented 6 years ago

Created the PR.

bvangennep commented 6 years ago

Merged and released