Topic on Project:Support desk

[RESOLVED] easy way to assign users read only access

3
Summary by Taavi

Also explicitly deny read from group "user".

193.227.215.156 (talkcontribs)

Hi all, I created a new group with this permissions:

$wgGroupPermissions['read_only']['edit'] = false;
$wgGroupPermissions['read_only']['read'] = true;

and I associated the user "guest" to the Group "read_only" but when login Guest user he can Modify the page !

below all group configurations in my "LocalSettings":


# Il permesso di modificare pagine viene tolto a tutti gli utenti non loggati
$wgGroupPermissions['*']['edit'] = false;
#Nego la possibilità di registrare nuovi account a meno di non essere loggati
$wgGroupPermissions['*']['createaccount'] = false;
#Nego la possibilità di leggere agli utenti non registrati
$wgGroupPermissions['*']['read'] = false;
#la riga seguente permette di rimuovere una pagina a tutti gli #utenti
$wgGroupPermissions['datamanagement']['delete'] = true;
$wgGroupPermissions['datamanagement']['move'] = true;
$wgGroupPermissions['datamanagement']['edit'] = true;
$wgGroupPermissions['read_only']['edit'] = false;
$wgGroupPermissions['read_only']['read'] = true;

thank you very much to all regards

Ciencia Al Poder (talkcontribs)

You need:

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['user']['createpage'] = false;

Basically, you need to explicitly set permissions for the group user since that's an implicit group for all users. And also manage the createpage right which is separate from edit.

See Manual:User rights.

193.227.215.156 (talkcontribs)

wow Ciencia, thank you ! now work fine I am very happy.

in my life it is first time that I receive support that work fine immediately :)

best regards Stefano