0

I'm aware of this question but the given (accepted) answer tries to resolve a particular problem so I don't consider it a duplicate of my question.

I have defined a group and I want that all new users as default are on this group. Later on, I can delete a user from this group if needed by the Special:Userrights page.

How to achieve this?

Community
  • 1
  • 1
nkint
  • 11,513
  • 31
  • 103
  • 174
  • I think you could do something with $wgAutopromote https://www.mediawiki.org/wiki/Manual:$wgAutopromote and $wgRevokePermissions https://www.mediawiki.org/wiki/Manual:$wgRevokePermissions. – Mark A. Hershberger May 02 '14 at 22:58
  • What is the reason you can't use the default user group for whatever new users are supposed to be allowed to do? – leo May 03 '14 at 13:22

1 Answers1

0

Normally, you would use the built in user group if you wanted to change permissions for new users, and have a other user groups for when you need to change that (i.e. adding or removing rights). That would be much more straightforward, easier to maintain, and easier to understand for other administrators of your wiki.

If you really need to add every new user to another user group (you don't tell us why this would be necessary) you can use wgAutopromote, as pointed out in the comments:

$wgAutopromote = array(
 'myUserGroup' => array( APCOND_EDITCOUNT, 0 )
);

Also, note that you can't directly remove a user from an autopromotion group through Special:UserRights.

Edit: As per the comments I understand that the unusual solution you are suggesting in your question is actually not needed. You should just create a user group for user that are not supposed to access the internal documents (e.g. $wgGroupPermissions['InternalDocs']['restrictedusers'] = false;), and then configure your extension to prevent them from accessing some documents. You might want to consider a better maintained extension for than the one you are using, btw, see: Editing permissions of MediaWiki default namespaces

Also, be adviced that MediaWiki is designed for openess, and any attempt to circumvent that, will have holes. See https://www.mediawiki.org/wiki/Security_issues_with_authorization_extensions

Community
  • 1
  • 1
leo
  • 8,106
  • 7
  • 48
  • 80
  • I'd like to have some "internal" contents visible only to internal users with the "Restrict access by category and group" extension. Normally all new user should be on this group but I'd like to have the possibility to revoke this right to a particular user. Anyway, the user should exists. For sure there is a better way, but I'm new to MediaWiki – nkint May 05 '14 at 10:16
  • Then you just need to add a group for ppl who are *not* supposed to read the pages! E.g. `$wgGroupPermissions['InternalDocs']['restrictedusers'] = false;` – leo May 05 '14 at 10:20