-
-
Notifications
You must be signed in to change notification settings - Fork 825
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/membership#4 - Admin Membership type is displayed on Public contr… #12178
Conversation
Jenkins re test this please |
jenkins, test this please |
test this please |
seems it fails due to the below error - https://test.civicrm.org/job/CiviCRM-Core-PR/20801/console
|
jenkins, retest this please |
@jitendrapurohit With your patch applied this is what I'm seeing:
Is there something I'm missing? |
@mattwire The steps are correct. Note that, the last step is performed as a non-admin user. Price Field value with (Agree that I should have mentioned this in the PR description) Thanks. |
@jitendrapurohit Ok. That's not quite how I expected it to behave, though probably correct. Is it specifically the "Administer CiviCRM" permission that is required or another permission? Could we update the help text on the config page to clarify. (Currently it reads: |
From the current flow of the code, it seems |
Ok, then I think this message is clearer: |
7341d19
to
5afcf70
Compare
@mattwire Thanks for the review and suggesstion. The help text is now modified as per the above comment. Can we have this merged now? |
I feel like I'd like some more opinions on this - or preferably someone else to kick the UI tires - @agh1 @lcdservices @MegaphoneJon @seanmadsen - any of you up to give a second reviewer eye on this? |
@jitendrapurohit I ran through some tests but didn't get expected results. I tried a few different scenarios:
I think your patch was intended to address the second scenario, but in my testing, doesn't seem to do that. am I missing something? |
Note the above comment #12178 (comment) for the second scenario, i.e, Admin visibility is actually shown to users having |
This caught me out at first but that's how it's meant to behave apparently and @jitendrapurohit is not changing that behaviour - but it should be clear when configuring the membership type now that the description has been updated to clarify the requirement for |
then it's not clear to me what the purpose of this patch is. when visiting the contrib page I was accessing anonymously, so I did not have the edit contrib perm. I understand that for admin users (i.e. those with that perm) the admin types will still display -- I don't have a problem with that. but for those without that permisson it should be hidden. |
|
@lcdservices @mattwire I think I know what might be the issue with the above testing. When the visibility of membership type is updated to Hence, make sure the membership type is updated after applying the patch. So the complete list of testing the patch would be -
Apply the patch and repeat the last 2 step. The membership type will not be displayed on the contribution page. Hope that helps. |
@jitendrapurohit I ran through another round of tests per your update and it worked as expected. And I agree with the behavior. |
merging per @lcdservices review |
…ibution page
Overview
Admin membership type displayed on public contribution page.
Before
When visibility of membership type is updated to
Admin
, it is still displayed on front-end contribution pages. Steps to replicate on dmaster -Admin
.After
Fixed.
Technical Details
Update done to membership type wasn't triggering the change in pricefieldvalue table.
Comments
Added unit test.
Gitlab Issue - https://lab.civicrm.org/dev/membership/issues/4