Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Can I assign two roles for two group with same role name ?? #627

Open
arifh opened this issue Feb 11, 2020 · 0 comments
Open

Can I assign two roles for two group with same role name ?? #627

arifh opened this issue Feb 11, 2020 · 0 comments

Comments

@arifh
Copy link

arifh commented Feb 11, 2020

In D7 I can add two role for two group with same name. Because two role rid is different.
Example -> Group A --> Subadmin (Rid --> 50)
Group B --> Subadmin (Rid --> 51)

But In D8
$entity_type = 'node';
$entity_bundle = '<bundle name'>;
$group_id = 'unique gid';
$extra_role_1 = OgRole::create();
$res = $extra_role_1
->setName('name')
->setLabel('lable')
->setGroupType($entity_type)
->setGroupBundle($entity_bundle)
->set('group_id',$group_id)
->save();

Here "name" behave as a unique rid. We can't use same multiple time.
Here "name" store at Config table like "og.og_role.node-bundle-subadmin"
Only lable can repeat.

When I migrate my feature D7 to D8, how can I migrate those D7 role with IDs

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

No branches or pull requests

2 participants