Wikimedia Developer Support

Pages for different groups in mediawiki

mediawiki

#1

hello everyone,

i am a student of a University in Berlin, i am doing an exercise of university that i have to create for each country a homepage with the help of Mediawiki, and each of this homepage has its own members, these members can just edit their homepage in their own language. For Example: i am member of group “Germany” so i am allowed to edit the page of germany, and you are member of group “USA” so you are not allowed to edit the page of Germany. i have looked on internet and tried with $wgGroupPersmissons in Localsetting.php of mediawiki, but i’m not sure how to give each group a right to be able to edit just the page in their group.

I habe the following troubles, i set these in LocalSetting.php

$wgGroupPermissions[‘Russia’][‘edit’] = true;
$wgGroupPermissions[‘Germany’][‘edit’] = true;

i thought if i do this, just members of Germany can edit the page of Germany, and members of Russia can edit the page of Russia. But members of both Groups can edit all the pages in my mediawikis pages.

Could anyone please give me any hints or advices , so i can deal with this problem.

Thank you so much in advance.

Kind Regards


#2

Hi @vancouver299! That’s an interesting exercise; would you mind sharing which university/course this is?

There are extensions which do this (see here) but I imagine if this is some kind of homework installing an extension is not the expected way of solving it. Check the getUserPermissionsErrors hook, you can use that to set arbitrary requirements for editing.