verbb / cp-nav

Control Panel Nav is a Craft CMS plugin to help manage your Control Panel navigation.
MIT License
130 stars 11 forks source link

Layout Permissions: Unwanted User Groups auto-added & cannot be removed #61

Closed ademers closed 4 years ago

ademers commented 5 years ago

Description

When I create a new layout and add a desired User Group, two other User Groups are automatically added.

Screenshot: https://cl.ly/f05af59bd23a

Steps to reproduce

  1. Create Layout called "Test".
  2. Assign a single desired Use Group. In my case, it's called "Calendar".
  3. Save changes.
  4. Click "Test" Layout to edit.
  5. Notice that 2 additional User Groups have been assigned permissions. In my case: "Banned" and "Inactive".
  6. Uncheck "Banned" and "Inactive" to remove & save.
  7. Click "Test" Layout to edit.
  8. "Banned" & Inactive are still checked.

Additional info

engram-design commented 4 years ago

Does this happen with all other groups when you edit them, or just this one? If so, are they they same Banned and Inactive selected?

I can't seem to reproduce this, but have a feeling its because User Group IDs are being stored, rather than the UID, which we should now that Project Config is in full-swing.

ademers commented 4 years ago

Not sure I understand the first part of your question. I have a layout called Membership to which I only want to assign the Membership permissions group. However, when I'm in the edit modal, I see that two other groups are selected: _Members & Banned. When I uncheck them and save, they are still selected when I reopen the edit modal. Screenshot: https://cl.ly/8263a8dd4afd

Does this help? Is there anything I can search for in the logs? Thanks!

engram-design commented 4 years ago

Sorry, I meant when you click on and edit other layouts - does it to the same thing for those? I noticed in your first screenshot you has Test and Judges for instance.

ademers commented 4 years ago

I deleted the Test layout in the meantime since I only created it to reproduce the issue. In actually, I currently have two layouts: Calendar & Membership. In Calendar layout, I only want to apply the Calendar permissions group. However, Banned & Inactive always remain. Screenshot: https://cl.ly/0585cb833823

engram-design commented 4 years ago

Fixed in 3.0.0.