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

change permission compare to use and instead of or #316

Merged
merged 1 commit into from
Apr 20, 2015
Merged

change permission compare to use and instead of or #316

merged 1 commit into from
Apr 20, 2015

Conversation

drmmr763
Copy link
Contributor

Permissions for leads had a bug where the if statement was comparing with an or instead of and. This resolves the issue. Reported here:

https://www.mautic.org/community/index.php/258-mautic-for-multiple-business/p1#p1095

To test:
Create a role which has permissions only to create, edit own and view own leads. Before patch going to the the lead manager will throw a 403.

After patch the page will properly load and not 403 if you have the correct permissions.

@alanhartless alanhartless added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Apr 16, 2015
@alanhartless
Copy link
Contributor

👍

@alanhartless alanhartless added this to the 1.0.4 milestone Apr 16, 2015
@ericfernance
Copy link

Hi Chad @drmmr763 ..... Fantastic I can confirm this patch works and when logged into client role I can now access leads and no longer get a 403 with permissions set to Edit Own and View Own for leads.

Cheers,
Eric.

@dbhurley
Copy link
Member

Works.

drmmr763 added a commit that referenced this pull request Apr 20, 2015
change permission compare to use and instead of or
@drmmr763 drmmr763 merged commit 1eb508a into mautic:staging Apr 20, 2015
@drmmr763 drmmr763 deleted the bug-leads-permissions branch September 4, 2015 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants