flipboxfactory / saml-sp

SAML Service Provider (SP) Plugin for Craft CMS
https://saml-sp.flipboxfactory.com/
Other
19 stars 5 forks source link

User groups and multiple environments (project config) #67

Closed fugelset closed 4 years ago

fugelset commented 4 years ago

Hi!

I have a question regarding creation of user groups, project config and multiple environments. As far as I understand it is recommended to only make changes to the project config (project.yaml) in a single environment. The user groups are part of the project.yaml and it seems to cause some issues if we deploy new changes to the environment where a new user group has been created.

+ sudo -u www-data /opt/php-7.1/bin/php ./craft project-config/sync --interactive=0 Applying changes from project.yaml ... error: Trying to get property of non-object

Should we disable automatic creation of user groups and manually create them instead? How is this typically handled?

dsmrt commented 4 years ago

Good point. I hadn’t thought about the impact this would have with the project config. I think you have it right though. Create the groups before. Then use the autoCreateGroups setting to make sure it’s off.

Although, it looks as if i removed the logic in the 2.0 upgrade (possibly?). I’ll need to add that back in.

dsmrt commented 4 years ago

Updated with https://github.com/flipboxfactory/saml-sp/releases/tag/2.1.11

fugelset commented 4 years ago

Thanks for quick support here.

It would have been nice if it was possible to tweak what was synced through the project.yaml file.

dsmrt commented 4 years ago

Are you saying manage the plugin settings through the project config?

fugelset commented 4 years ago

No, I wanted to turn of synchronization of user groups through the project.yaml file. To avoid issues with different user groups on the different environments. This is a Craft issue and has nothing to do with your plugin.

dsmrt commented 4 years ago

Ok got it. Ya that does kind of suck. I was thinking the same thing. It’s almost like we should be able to define exemptions. We’ve run into this before with other plugins on projects using the project config.