CodeIgniter Forums
AuthGroups init pb with shield:setup ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: AuthGroups init pb with shield:setup ? (/showthread.php?tid=83292)



AuthGroups init pb with shield:setup ? - frederic.bonnotte - 09-23-2022

hi,
(sorry for my poor english)
I use ci4.2.6 with shield.
getPermissions() give me null when I only map permission to groups in AuthGroups.php (it seems database isn't correctly populated with shield : setup).
But, getPermissions() is ok when I use addPermission() (database is correctly populated after addPermission() use).
Any idea ?
Thanks for advance.


RE: AuthGroups init pb with shield:setup ? - gosocial2 - 10-14-2022

As a Myth/Auth user, I experienced a similar thing when I gave CodeIgniter Shield a try and saw that there is no groups table created at all.

I thought maybe it's under development (not done yet) and/or the users need to put in place their own implementation. There does not appear to be a clear approach for this in the documentation, or did I miss something?

Once this is cleared out, I can even come up with a fairly straight forward approach for migrating Myth/Auth data to Shield.

How would you migrate your Myth/Auth user groups to Shield, for example?


RE: AuthGroups init pb with shield:setup ? - datamweb - 10-14-2022

See here, it might help you:

https://github.com/codeigniter4/shield/discussions/448


RE: AuthGroups init pb with shield:setup ? - InsiteFX - 10-15-2022

I just checked and the migration does have the code in it to create the auth_groups_users

Make sure you run the migrations.