gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.04k stars 204 forks source link

article behavior 'Show Unauthorised Links' #2542

Open Tazzios opened 5 years ago

Tazzios commented 5 years ago

The 'Joomla Articles' particle doesn`t follow the default Joomla behavior of the ‘Show Unauthorised Links’ setting from articles.

Reproduce add an article set 'Show Unauthorised Links' to yes And make a 'Joomla Articles' particle with corresponding article ID

Expected Guest, can see the article title and intro, when clicking on read more a logging pops up Registrated user, can see the article title and intro, when clicking on read more the can see the complete article

Result Guest, article is not visible. Registrated user, can see the article title and intro, when clicking on read more the can see the complete article

Tazzios commented 5 years ago

i found a other problem in the related code: access rights are based on the category permissions instead of the article permissions.

https://github.com/gantry/gantry5/blob/150c215830feea9bc3e08e7c9a88dfaa3bc0ff01/src/platforms/joomla/classes/Gantry/Joomla/Content/ContentFinder.php

Tazzios commented 5 years ago

I made a fork and tried somethings.(Disclaimer i`m not a programmer) https://github.com/gantry/gantry5/compare/develop...Tazzios:develop

Possible problems:

It looks like a rabit hole by default: https://github.com/joomla/joomla-cms/issues/21407

mahagr commented 5 years ago

Now that I did read this issue again, I think that we should keep the query as it was, but instead of linking to the article, link to login form instead..? I find it surprising, though, that Joomla does not handle this internally.

Tazzios commented 5 years ago

Now that I did read this issue again, I think that we should keep the query as it was, but instead of linking to the article, link to login form instead..? I find it surprising, though, that Joomla does not handle this internally.

No that`s not the problem, that is working fine in my solution. The current problem is that the article isn't shown at all because gantry doesn't do anything with the 'Show Unauthorised Links' setting from the article(or global) it only looks at the access level.