-
Notifications
You must be signed in to change notification settings - Fork 204
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
Unauthorised links and article authorisation fix #2545
base: develop
Are you sure you want to change the base?
Conversation
article behavior 'Show Unauthorised Links' #2542 Removed the autorisation check on category level Added check on show_noauth.
article behavior 'Show Unauthorised Links' #2542 Removed the autorisation check on category level so that the check will be only on category level.
#1 added is null or empty and JSON_UNQUOTE
Forgot a table prefix
@Tazzios I will need to look at how the latest Joomla deals with this. You likely used Joomla code to implement this change, can you share it to me? :) |
For the fix i didn`t check the joomla code, so this is al reversed: 1. Inherited authorization
How it works In joomla: a new article get the same authorization as the category by default but it is possible to give the article a totally different acces level. That's why, if you want to get the articles, you shouldn't apply the category acces level.
2. Show intro to unauthorized users
I think this code says something like if show_noauth=true don`t apply the access filter for the article. ( but i could be wrong about that ;) )
|
The method was added to MariaDB 10.2.3, MySQL 5.7, both released around late 2016. Unfortunately Joomla up to 3.9 requires only MySQL 5.1, so we would need to delay this change for Gantry 5.5 where we raise the requirements. |
Instead of using JSON_EXTRACT it is possible to extract that information with PHP but that require extra code. I`m not that good that i can make that. At joomla the also noticed the JSON support, as a lot of settings are saved as JSON file in the database.
Part 1 is more imported as that situation occurs al lot more. It is also easier to fixed by:
|
I think there's still use for category ACL as you may have a particle listing all the categories (and it can be used for non-article categories). But for locating the articles we may want to look at updated Joomla code (yes, the current code was implemented by reading what Joomla used to do back in 2016). I think the queries were mostly based on Joomla content modules. I am looking into Joomla 4 now, maybe I can take a look on Joomla 3.9/4.0 articles and try to update the code as those are going to be the "supported" versions of Gantry 5.5. In quotes as Joomla 4 isn't out yet and there's still a lot of work to do in supporting Bootstrap 4. |
Yes I don't say other wise, but currently there is also a category check in the contentfinder.php which is wrong in any situation.
Great. :) |
#2542
Good Changes
questional change:
Instead of removing the acces level check for category There should be a way to retrieve articles from given category id which doesn't take the category acces level in to account.
The change that i made is a problem if there are particles that want to show category`s with different access levels