Skip to content
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

User permissions (group) on backend #13

Open
snipiba opened this issue May 4, 2016 · 1 comment
Open

User permissions (group) on backend #13

snipiba opened this issue May 4, 2016 · 1 comment

Comments

@snipiba
Copy link

snipiba commented May 4, 2016

On backend section is unable to change user group in "ROLES" tab, because form input is named same as default groups ...

On "Account" tab is User[groups][] checkboxes,
and on "Roles" tab is User[groups][] checkboxes...

Then when i will change user role in Roles tab, then checkbox is "checked" on Account tab, no on Roles tab...

Maybe is needed to change checkboxes name from User[groups][] to User[roles][]

@kabiraparesh
Copy link

kabiraparesh commented Jun 5, 2016

The following workaround works for me.
Change (Line 34 of Plugin.php)
$model->belongsToMany['groups'] = ['ShahiemSeymor\Roles\Models\Group', 'table' => 'shahiemseymor_assigned_roles', 'otherKey' => 'role_id'];
with
$model->belongsToMany['anythingelse'] = ['ShahiemSeymor\Roles\Models\Group', 'table' => 'shahiemseymor_assigned_roles', 'otherKey' => 'role_id'];

And
Change (Line 67 of Plugin.php)
$widget->addFields([ 'groups' => [ 'label' => 'Groups', 'commentAbove' => 'Specify which groups this person belongs to.', 'tab' => 'Roles', 'type' => 'relation' ] ], 'primary');
with
$widget->addFields([ 'anythingelse' => [ 'label' => 'Groups', 'commentAbove' => 'Specify which groups this person belongs to.', 'tab' => 'Roles', 'type' => 'relation' ] ], 'primary');

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

No branches or pull requests

2 participants