Open GoogleCodeExporter opened 8 years ago
Hi tbm:
First, need to specify whether login is required or not for a specific action:
$wgPageAttachment_permissions['download' ]['loginRequired'] = false;
Second, need to specify whether a specific action is allowed or not:
-- When login is NOT required, the format to allow an action is:
$wgPageAttachment_permissions['download' ]['allowed'] = true;
-- When login IS required, the format to allow an action is:
-- for any group
$wgPageAttachment_permissions['download' ]['group']['*'] = true;
-- for a specific group
$wgPageAttachment_permissions['download' ]['group']['group name'] = true;
-- for s specific user
$wgPageAttachment_permissions['download' ]['user' ]['user id'] = true;
Now, you want to allow users to view & download without login in, so you need
the following configuration:
$wgPageAttachment_permissions['view' ]['loginRequired'] = false;
$wgPageAttachment_permissions['download' ]['loginRequired'] = false;
$wgPageAttachment_permissions['view' ]['allowed'] = true;
$wgPageAttachment_permissions['download' ]['allowed'] = true;
The documentation page on user rights management is at the following link:
http://code.google.com/p/mediawiki-page-attachment/wiki/PageAttachmentUserRights
Let me know how I can improve it to make it more clear.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 12 Apr 2013 at 6:02
Aldrin, thanks for taking the time to explain permission handling to me.
I wasn't aware of the wiki page, which is very well done. It might be worth
adding that to a README file in the source zip file.
Anyway, I added the configuration settings you suggested and it still did not
work. After playing around some more, I found that I need the following
settings:
$wgPageAttachment_permissions['viewOnProtectedPages'
]['loginRequired'] = false;
$wgPageAttachment_permissions['downloadOnProtectedPages'
]['loginRequired'] = false;
$wgPageAttachment_permissions['viewOnProtectedPages' ]['allowed'] =
true;
$wgPageAttachment_permissions['DownloadOnProtectedPages' ]['allowed'] =
true;
This strikes me as odd because the page is not protected. I verified by going
to Special:ProtectedPages and got "No pages are currently protected with these
parameters."
Original comment by t...@cyrius.com
on 12 Apr 2013 at 1:51
Hi tbm:
Thanks for the suggestion, will add a README file with info.
I would appreciate if you little more details on your wiki setup and I'll try
to replicate the issue where you need to use protected page setting even though
you should not need them.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 15 May 2013 at 6:45
I believe it's a normal wiki setup. What would you like to know exactly? I can
share the config file with you or give you an account on the wiki.
Original comment by t...@cyrius.com
on 15 May 2013 at 7:49
Hi tbm:
Okay, finally figured it out: in MediaWiki there are multiple ways to check
whether a page is protected or not based on namespace settings, user edit
permission, etc. The current setup is not foolproof. So, I'll update the code
to check for all the protection settings before deciding whether the page is
really protected or not.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 13 Jun 2013 at 4:22
Original issue reported on code.google.com by
t...@cyrius.com
on 11 Apr 2013 at 11:19