-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teams/Groups feature #1804
Teams/Groups feature #1804
Conversation
c14b302
to
6dd191a
Compare
Thank you, really nice work! Can you also add a solution for a group of roles? For example one role is Documentcreator and one is Invoicecreator and you can sum them up in the role Accountant? |
@Restingo Why don't just assign Documentcreator and Invoicecreator? |
@systemsolutionweb because I've got a lot of roles that are the same for many functions / people and therefore I want to group them together for easy use. |
@Restingo for that you just have to add a parent table for Teams support is something that has been needed for a long time 👍 |
@drbyte ready for review, now
|
c0e768d
to
5fb0f55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erikn69 Thank you for your detailed work on this PR.
I've highlighted a number of minor typographical errors,
and commented about requesting the bugfix to be split to a separate PR.
3a4bd75
to
93c6ee9
Compare
@erikn69 Can you review my merge-conflict resolutions? |
Thanks @erikn69 ! |
Hola, me fuera gustado que se pudiera compartir un mismo rol para diferentes teams. Digamos que tengo un usuario que pertenece a 2 teams, y en ambos team tiene el rol de administrador. Con el modelo actual se tendrian que crear dos roles administrador, 1 para cada team, lo que hace que cada vez que se genere un nuevo team, se tenga que replicar todos los roles con sus permisos, y seria deseable que se pudieran compartir. |
@jame0928 si puedes usar el mismo rol en diferentes teams, lee la documentacion , los roles globales aplican los mismos permisos para todos los teams // with null team_id it creates a global role, global roles can be used from any team and they are unique
Role::create(['name' => 'administrador', 'team_id' => null]); Tambien puedes tener Super Admin, lee este comentario #1840 (comment) |
##TEAMS FEATURE
Usage in docs
A fully backwards compatible addition to for teams/groups functionality. I have added the tests and docs for this PR, and i can help to bug's review around it. I have been using this code overriding the methods with custom models for 2 years without problems, now i want to share with everyone.
Teams table must be already migrated on db, and foreign key can be customizable by config file.
team_id
as default.Also, i can improve the upgrade method with another(done, added upgrade migration and commandmigration
if necessarysetup-teams
, roles with teams support on commandcreate-role
).Example Communities #1782:
Where green tables(
users
,community_user
, andcommunities
) are handled by custom migrations. Only new pivotcommunity_id
is added to the package migration file.Closes #1812
Closes #1782
Closes #1743
Closes #1744
Closes #1654
Closes #1629
Closes #1634
Closes #1499
Closes #1362
Closes #1353
Closes #1348
Closes #1187
Closes #1186
Closes #1135
Closes #1067
Closes #551
Closes #540
Closes #110
Closes #8
And many others
##BUGS FIX
On tests(#1819)*_before_saving_object_doesnt_interfere_with_other_objects
, sqls from first object are executing on second object and try to sync and load relation againAnd other small fixes that i already forget