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

Added permission (Lockdown) check on db query #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aploe
Copy link

@aploe aploe commented Sep 12, 2018

I made DPL work with the Lockdown extension. Now DPL only shows Articles from Namespaces that the current user has permission to "read". As I see it, the changes shouldn't touch any other functions or conflict with any other extension.

Just added the user-object (made $wgUser global - I din't know how to get the object with another call) and the Lockdown-array ($wgNamespacePermissionLockdown - also global). Then I compare the "read" part of the Lockdown-array (should hold all groups with "read" permission) against the current user groups and add all namespaces to the $addNotWhere array that shouldn't be seen.

It's not that pretty but works perfectly fine on our wikis.

@Alexia
Copy link
Owner

Alexia commented Sep 12, 2018

Sorry, I had no idea this was actually editing the code in the repository of your fork. O_o That is unexpected behavior from Github I did not expect.

@aploe
Copy link
Author

aploe commented Sep 12, 2018

Ah, that's perfectly fine with me. Doesn't change the behaviour at all and does definitly look a bit prettier ;)
And the code changes should be pushed to my fork,. This is how my fork can stay up to date with your master.

@aploe
Copy link
Author

aploe commented May 7, 2019

I think you still have to merge the pull request ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants