Skip to content

Fixes Roles to work with rainlab.user and adds key to User relation #10

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

firemankurt
Copy link

Please add 'key' => 'user_id' to definition to help other plugins avoid issues when extending the user plugin. See: https://octobercms.com/forum/post/model-extending-base-rainlabuser-model-is-triggering-shahiemseymorroles-in-backend-form-causing-sql-error

@firemankurt
Copy link
Author

Fixes Roles to work with rainlab.user

This will use RainLab\User\Models\UserGroup for group storage and
ShahiemSeymor\Roles\Models\UserPermission for permision storage.

Still need to create a migration to move existing groups from ShahiemSeymor\Roles\Models\UserGroup to RainLab\User\Models\UserGroup

@firemankurt firemankurt changed the title Add key to User relation Fixes Roles to work with rainlab.user and adds key to User relation Oct 21, 2015
@firemankurt
Copy link
Author

Use this query to copy groups over:

REPLACE into user_groups (id, name, description, created_at, updated_at)
select id, name, description, created_at, updated_at FROM shahiemseymor_roles

REPLACE INTO users_groups ( user_id , user_group_id )
SELECT user_id , role_id FROM shahiemseymor_assigned_roles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant