-
-
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
Add "Manage Premiums" to AdminUI, toward dev/core#3912 . #28540
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
Nice Thank you But (sorry I'm testing my first review on your PR ;-) ) :
|
7194d06
to
9a94794
Compare
Thanks for the review @UshaMakoa . I've removed "WIP" ("work in progress") from the title, and I think now it's actually ready. With help from @aydun I was able to address the items you mentioned, and a little more. i suggest this is ready for review now. |
Thanks for the help @aydun ! |
@twomice thanks for this PR it looks very good. |
4ae3ac6
to
403c55e
Compare
@colemanw I've made those changes now; hopefully this is good, but please let me know if more is needed. Thanks! |
403c55e
to
a0faf6f
Compare
The paths in the XML and DAO are different: they should have the |
a0faf6f
to
9775275
Compare
@aydun I've made that change now (if I understand you correctly), and functionality seems to be correct. Thanks for the feedback! Any further requirements, please let me know. |
xml/schema/Contribute/Product.xml
Outdated
@@ -6,6 +6,9 @@ | |||
<comment>able - stores "product info" for premiums and can be used for non-incentive products </comment> | |||
<name>civicrm_product</name> | |||
<add>1.4</add> | |||
<paths> | |||
<preview>civicrm/admin/contribute/managePremiums?action=preview&reset=1&id=[id]</preview> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path doesn't seem to match the one in the generated DAO file.
'server_route' => 'civicrm/admin/contribute/managePremiums', | ||
'is_public' => FALSE, | ||
'permission' => [ | ||
'access CiviCRM', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to match this to whatever permission was being checked previously for this screen.
I find the menu xml files a bit too magical in the way they assign permissions to paths, but I think the way it works is that the standard url inherits its permissions from the next path in the hierarchy that has them declared, and that would be civicrm/admin
. And that one checks administer CiviCRM system + administer CiviCRM data + access CiviCRM
. That seems a bit silly. Maybe we should set this to
'access CiviCRM', | |
'access CiviContribute', | |
'administer CiviCRM data', |
@twomice I think we're very close on this one. if you could just check those last 2 comments, I think that's all that's left to do before merging. |
@colemanw if you want to merge this & make those changes in a follow up I'll merge the follow up |
Ok I fixed the path. Lets merge this now & try to fix the Afform permissions during the RC period. |
Thanks; sorry I couldn't get to this quicker. |
Followup fix to civicrm#28540 (comment)
Overview
Add "Manage Premiums" to AdminUI
Before
After
Technical Details
None.
Comments
None. Should be ready to review now.