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

dev/core#983 Fix Access CiviCampaign permissions (instead of admin) #22459

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented Jan 10, 2022

Overview

https://lab.civicrm.org/dev/core/-/issues/983

and https://civicrm.stackexchange.com/questions/24409/whats-the-expected-behaviour-for-civicampaign-and-permissions

It's not possible for users without "administer CiviCampaign" to search/access some campaign activities.

Before

Non-admins cannot search for campaign data.

After

non-admins can search/view campaign data.

Comments

I have to admit that I have worked on this a while ago, patched locally and forgot about it. We have been running the patch in production for the past 2 years. A few NDI users required this feature, so I think it's well-tested.

ping @francescbassas @andyburnsco @pfigel (folks who commented on the gitlab issue)

@civibot
Copy link

civibot bot commented Jan 10, 2022

(Standard links)

@civibot civibot bot added the master label Jan 10, 2022
@andyburnsco
Copy link
Contributor

I've tested this and the campaign field shows up in search screens as well as when adding relevant entities e.g. a contribution when granting the permissions manage campaign. Progress :)

I still feel something is not right, though. administer CiviCampaign and manage campaign are quite close to each other in what they do. I think a more baseline permission level is needed, which may be a separate PR etc.

CiviCampaign: administer CiviCampaign
Create new campaign, survey and petition types and their status

CiviCampaign: manage campaign
Create new campaigns, surveys and petitions, reserve respondents

It seems appropriate that there would be an access civicampaign permission for users who just need to search campaigns. Ideally we'd go further and limit who could edit campaigns on entities but for now I'd say it is okay to group search and add/edit into one permission.

@colemanw
Copy link
Member

In order to not let perfect be the enemy of good, I'm going to merge this, noting that follow-up work is still needed to add an "access CiviCampaign" permission to the system (also noting that a volunteer hasn't yet stepped up to do that work, but would be very welcome).

@colemanw colemanw merged commit 8631f1f into civicrm:master Jan 11, 2022
@andyburnsco
Copy link
Contributor

Yeah this was an quick win to get out of the way. We're looking to fund some further work on it and are starting those talks. Thanks :)

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

Successfully merging this pull request may close these issues.

3 participants