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

[fix] Display subcategories in blog layout only when user has access #18408

Merged
merged 3 commits into from Oct 27, 2017

Conversation

Projects
None yet
6 participants
@infograf768
Member

infograf768 commented Oct 24, 2017

Pull Request for Issue #18397

Summary of Changes

Check access to subcategories.

Testing Instructions

See #18397

Before patch, subcategories display even if they are set to registered access. Clicking on their title gets a 403.

After patch the registered subcategories do not display until the user has logged in.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Oct 24, 2017

Member

Indentation had to be changed which explains why this patch looks so big.
real code changes are very small.

Member

infograf768 commented Oct 24, 2017

Indentation had to be changed which explains why this patch looks so big.
real code changes are very small.

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman Oct 24, 2017

Contributor

@infograf768 there is only one changed line in the pr

Contributor

brianteeman commented Oct 24, 2017

@infograf768 there is only one changed line in the pr

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Oct 24, 2017

Member

Nope. You have only seen +$user = JFactory::getUser();
look further and please test

+		<?php $groups = $user->getAuthorisedViewLevels(); ?>
+		<?php // Check whether category access level allows access to subcategories. ?>
+		<?php if (in_array($child->access, $groups)) : ?>

and obvioulsy a new endif before endforeach

Member

infograf768 commented Oct 24, 2017

Nope. You have only seen +$user = JFactory::getUser();
look further and please test

+		<?php $groups = $user->getAuthorisedViewLevels(); ?>
+		<?php // Check whether category access level allows access to subcategories. ?>
+		<?php if (in_array($child->access, $groups)) : ?>

and obvioulsy a new endif before endforeach

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Oct 25, 2017

Member

Needs tests, folks. thanks.

Member

infograf768 commented Oct 25, 2017

Needs tests, folks. thanks.

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman Oct 25, 2017

Contributor

I have tested this item successfully on 3e34671

tested successfully for article category blog but shouldnt the same change be made for article category list

luckily the contacts component does not have the same issue


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

Contributor

brianteeman commented Oct 25, 2017

I have tested this item successfully on 3e34671

tested successfully for article category blog but shouldnt the same change be made for article category list

luckily the contacts component does not have the same issue


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

@csthomas

This comment has been minimized.

Show comment
Hide comment
@csthomas

csthomas Oct 25, 2017

Contributor

I have tested this item successfully on 3e34671

It would be good to do the same for beez3 template?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

Contributor

csthomas commented Oct 25, 2017

I have tested this item successfully on 3e34671

It would be good to do the same for beez3 template?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Oct 25, 2017

RTC after two successful tests.

franz-wohlkoenig commented Oct 25, 2017

RTC after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC label Oct 25, 2017

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Oct 25, 2017

Member

yes to both i.e list and beez.

Member

infograf768 commented Oct 25, 2017

yes to both i.e list and beez.

@mbabker

This comment has been minimized.

Show comment
Hide comment
@mbabker

mbabker Oct 26, 2017

Member

Based on comments does this need further updates?

Member

mbabker commented Oct 26, 2017

Based on comments does this need further updates?

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Oct 26, 2017

Member

Will try to update today for list and beez, if OK for you @mbabker

Member

infograf768 commented Oct 26, 2017

Will try to update today for list and beez, if OK for you @mbabker

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Oct 26, 2017

Member

Updated:
Added similar code for category list and blog/list for Beez.

@brianteeman
@csthomas
Please test again

Member

infograf768 commented Oct 26, 2017

Updated:
Added similar code for category list and blog/list for Beez.

@brianteeman
@csthomas
Please test again

@infograf768 infograf768 added this to the Joomla 3.8.2 milestone Oct 26, 2017

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Oct 26, 2017

Member

Restarted travis as php 5.6 did not complete.

Member

infograf768 commented Oct 26, 2017

Restarted travis as php 5.6 did not complete.

@joomla-cms-bot joomla-cms-bot removed the RTC label Oct 26, 2017

@csthomas

This comment has been minimized.

Show comment
Hide comment
@csthomas

csthomas Oct 26, 2017

Contributor

I have tested this item successfully on 6a6e91d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

Contributor

csthomas commented Oct 26, 2017

I have tested this item successfully on 6a6e91d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Oct 26, 2017

I have tested this item successfully on 6a6e91d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

franz-wohlkoenig commented Oct 26, 2017

I have tested this item successfully on 6a6e91d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18408.

@joomla-cms-bot joomla-cms-bot added the RTC label Oct 26, 2017

@joomla-cms-bot joomla-cms-bot removed this from the Joomla 3.8.2 milestone Oct 26, 2017

@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Oct 26, 2017

RTC after two successful tests.

franz-wohlkoenig commented Oct 26, 2017

RTC after two successful tests.

@joomla-cms-bot joomla-cms-bot changed the title from [fix] Display subcategories in blog layout only when user has access. to [fix] Display subcategories in blog layout only when user has access Oct 27, 2017

@infograf768 infograf768 added this to the Joomla 3.8.2 milestone Oct 27, 2017

@mbabker mbabker merged commit 9de96ec into joomla:staging Oct 27, 2017

5 checks passed

JTracker/HumanTestResults Human Test Results: 2 Successful 0 Failed.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound No violations found. Woof!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment