Topic on Project:Support desk

How to block all logs whatsoever to non Administrators?

12
49.230.68.40 (talkcontribs)

I have a personal; non communal (at least at this point); MediaWiki 1.34.0 based, content website in which I publish technical services I offer. As a general rule, this site is not edited communally and I am its only registered user and hence its only administrator/sysop (someday I might appoint an helper or open it for communal edit but for now I don't have such a plan and anyway not prepared for that).

From various reasons, I want deleted (or moved) pages to not appear to anyone besides myself, and if they do, well, only in logs.

The following LocalSettings.php command helped me with deleted pages but not with moved pages:

$wgLogRestrictions['delete'] = 'deletedtext';

Because I know there are many logs (more than just "deleted pages" and "moved pages") and that by principle. new logs can always be added without me knowing it as a user of automatic upgrades, I contemplate to just block all logs whatsoever to non sysops and be done with it; assuming this is a good solution, I ask:

How to block all logs whatsoever to non Administrators?

This command didn't help me: $wgLogRestrictions["*"] = 'deletedtext';


49.230.68.40 (talkcontribs)

Adding the following to LocalSettings.php didn't help:

$wgGroupPermissions['sysop']['restricted-logs'] = true;

$wgLogRestrictions['rights'] = 'restricted-logs';

$wgLogRestrictions['import'] = 'restricted-logs';

Ammarpad (talkcontribs)

You'll have to add the logs and needed right in an associative array:

$wgLogRestrictions = [ 'delete' => 'deletedtext', 'move' => 'deletedtext', 'block' => 'deletedtext', 'xyz log' => 'deletedtext' ];

49.230.68.40 (talkcontribs)

Well, while the following might be good enough for me and for many others:

$wgLogRestrictions['delete'] = 'deletedtext';

$wgLogRestrictions['move'] = 'movedtext';

If you know away to restrict all logs to sysops only, please share it.

49.230.68.40 (talkcontribs)

@Ammarpad I just saw your comment; thanks.

49.230.68.40 (talkcontribs)

@Ammarpad

Please share your thoughts about this code block I came up with, it seems enough for me personally but I'm not sure it's totally correct:

$wgLogRestrictions = [

   'delete' => 'deletedtext',

   'move' => 'movedtext',

   'merge' => 'mergedtext',

   'block' => 'blockedtext',

   'upload' => 'uploadedfiles',

   'import' => 'importedfiles',

   'rights' => 'rightforuser'

];

Beyond naming or syntax, I'm not sure how am I supposed to know with which groups of users it deals (sysops, and possibly also?...),

Thanks in advance for help with this !!!

49.230.68.40 (talkcontribs)

Is this a good approach if all I want to restrict is deletions, movements, merges, code block formation, uploads and imports and right changes?

$wgLogRestrictions = [

   'delete' => 'deletedtext',

   'move' => 'movedtext',

   'merge' => 'mergedtext',

   'block' => 'blockedtext',

   'upload' => 'uploadedfiles',

   'import' => 'importedfiles',

   'rights' => 'rightforuser'

];

49.230.68.40 (talkcontribs)

Wired, my comment above this one appeared to have been deleted or unpublished but after republishing in a similar fashion both appeared.

Ammarpad (talkcontribs)

Only the first item will work correctly, that's delete' => 'deletedtext'. The rest will not behave the way you think, because these logs will not be viewable to anybody.

For it to work correctly, the right hand part of the array (the values), must be valid permission names defined by MediaWiki or extension or in your LocalSettings.php.

That's why in my example above I used 'deletedtext' throughout because it's given in your example and it's one of the default sysop permissions. So you don't need to change that part to a name that looks similar to the log name, you just need to use a valid right from admin group. You can use any of 'deletedtext', 'block' or 'delete' for example.

To see which group has which right; go to Special:ListGroupRights on your wiki. The name in parentheses is the internal permission name and that's what you can use in the above array. Beside each permission, you'll a find short description of what it allows person in the group to do.

49.230.68.40 (talkcontribs)

@Ammarpad I admit I am having a hard time finding what fits what; but:

If I understood correctly from reading about deletedtext at Special:ListGroupRights page in my Wiki website, than:

I understand that that command, restricts any data about deleted AND moved webpages from any user which isn't a sysop,

i.e

$wgLogRestrictions = [

   'delete' => 'deletedtext'

];

Is like saying: Restrict ("delete") any data about deleted or moved data ("deleted data") from anyone which isn't a sysop.

---

If, so far, I have understood correctly, than this command itself, without the additions you have specified above (and I thank you for specifying them), is enough for me personally.

49.230.68.40 (talkcontribs)

Is like saying: Restrict ('delete') any data about deleted or moved data ('deletedtext') from anyone which isn't a sysop*.

49.230.68.40 (talkcontribs)

Sadly I cannot further edit my above comment (if I would write it in markdown it was probably more accurate in the first place). I find it problematic that we cannot edit posts here while from the same IP and further problematic that there aren't options to flag posts here.

Reply to "How to block all logs whatsoever to non Administrators?"