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

Reports view defaults to the primary site event though the primary site is not one of the options #373

Closed
NathanBate opened this issue Mar 25, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@NathanBate
Copy link

I restricted a user group to one specific site in Campaign.

  • When I log in as that user and go to the Campaign reports, all the reports show from the primary site in the CraftCMS sites list.
  • When I click on the site switcher, the primary site isn't even an option and only the assigned site is an option.
  • When I click the assigned site for this user then the primary site reports are no longer available (which is the way it should have originally been).

CleanShot 2023-03-25 at 10 08 45@2x

CleanShot 2023-03-25 at 10 10 08@2x

CleanShot 2023-03-25 at 10 10 42@2x

The expected behavior would be for only the site that was assigned as available would show up when the user clicks on reports.

I am on Campaign Lite 2.5.5
I am on CraftCMS 4.4.5

@NathanBate NathanBate added the bug Something isn't working label Mar 25, 2023
@NathanBate NathanBate changed the title Reports view defaults to the default site event though the default site is not one of the options Reports view defaults to the primary site event though the primary site is not one of the options Mar 25, 2023
@bencroker
Copy link
Collaborator

I restricted a user group to one specific site in Campaign.

How specifically did you do this? I assume you mean that you restricted a user group to editing a specific site under the Sites user permission, is that correct?

I can replicate the site switcher issue so will address this bug.

@NathanBate
Copy link
Author

@bencroker, Yes, that is how I restricted the user to a specific site - through the Sites user permission. Thank you for looking at this.

@bencroker bencroker self-assigned this Mar 25, 2023
@bencroker
Copy link
Collaborator

Thanks for the bug report. Fixed in d9c2ab7 for the next release.

@NathanBate
Copy link
Author

Thanks Ben!

@bencroker
Copy link
Collaborator

Released in version 2.6.0.

@NathanBate
Copy link
Author

@bencroker I just installed 2.6.0, and it is working great. Thank you! There is one other way where a CraftCMS user restricted to one site can view all the reports on another site: Campaign --> Reports --> Contacts Tab --> Click on a contact --> All reports are available for viewing.

I understand this may not be within your scope, but I thought I would check just in case. It would be nice if the user does not have contact edit permissions that they could not click into that contact (like on the Campaign --> Contacts screen).

@bencroker
Copy link
Collaborator

The site permissions are not quite as specific as you seem to be interpreting them, however, the Campaign plugin permissions are. If a user does not have permission to “Manage contacts” then they should not be able to access the contacts. Are you seeing otherwise?

@NathanBate
Copy link
Author

I suspected that I may be interpreting things too narrow for your scope. Here are some screenshots.

They can view the contacts on the contacts page but not edit them (because I have that permission turned off)

CleanShot 2023-04-04 at 18 46 56@2x

They can view a list of contacts on the reports screen and click on an individual contact. It is on this screen that I wondered if they should be able to click into or not if they are not supposed to be able to edit a contact.

CleanShot 2023-04-04 at 18 48 48@2x

They can view the individual contact's activity history on the report contacts screen.

CleanShot 2023-04-04 at 18 49 33@2x

@bencroker
Copy link
Collaborator

They cannot edit contacts, but they can view them, presumably because the “View reports” permission is enabled.

@NathanBate
Copy link
Author

Got it, yes. "View reports" is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants