Is there a way to allow domain users to edit a mediawiki page? (without manually creating multiple users?)
You could try to install the LDAP Extension and diallow all edits for anonymous users and disable manual registration:
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createaccount'] = true;
So, only your ldap members can login and edit pages.
Related
Is it possible to set up my wiki so that when user login, they have options to either login through OpenIDConnect (which i already have set up on my wiki) or login through the normal Mediawiki login?
enable $wgPluggableAuth_EnableLocalLogin = true to do this
Is it possible to add a vcard for some other jabber user in ejabberd. I am logged in as admin#domain.com. While creating users in my website i am registering a jabber account for the same user. Now i need to add vcards for those users. While trying to add vcard for a new user, i can see that the vcard entry is added to the currently logged in user(in my case it is admin#domain.com). I am using strophe library and the code used for adding vcard is as follows.
iq = $iq({ type: 'set', to: 'user#domain.com' }).c('vCard', { xmlns:'vcard-temp' }).c('PHOTO').c('EXTVAL', 'http://image_url/image.jpg');
conn.sendIQ(iq);
But i can achieve the same using
ejabberdctl set_vcard jabber_id domain PHOTO img.jpg from CLI
The purpose is to add profile images to users. I have the profile images saved in my server for each users registered in my site. Currently i am doing an ajax call for fetching the user profile image. Is there any alternative for this? Any help will be really appreciable.
XMPP protocol does not define a way to edit vcard for other users and ejabberd does not implement something special to allow this.
You can use a database backend for Vcard or write a custom Vcard backend plugin to suit your needs.
I am new to Yii2 ( I have used Yii previously).
Is there any straight forward way in Yii2 through which a user can be restricted to edit/delete his own content. for eg.
I have some posts in my system.Published posts can be seen by anyone.(only owner can view unpublished posts).
A post can be edit/delete by only content owner or Admin
You can use the components provided by Yii2 for the authorization and control of access to the actions permitted to a user. To do this you should take a look at this:
Yii user Authentication
I have a site built on mediawiki. How do I ensure that to create a new account the user must first confirm his email by clicking a link sent to his email address?
There is no built-in way to do that that I know of although you can get pretty close. The $wgEmailConfirmToEdit variable let's you prevent people from editing unless they have confirmed their email address. Just set:
$wgEmailConfirmToEdit = true;
in your LocalSettings.php
A wiki I maintain has been hit pretty hard by spam bots... we don't have a lot of users, and I'd rather not saddle the legitimate users with captcha. Is there a simple way to make registration confirmation go to an admin? I've looked through the manual, and haven't been able to figure out how to do it.
You could create a new user right, e.g. "approved", allow admins to assign that right and restrict things like editing to only approved users, like this:
// Disallow editing and uploading from anons and registered users
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = false;
// New user group: approved users
$wgGroupPermissions['approved']['edit'] = true;
// Allow admins to approve (and unapprove) users via Special:UserRights
$wgAddGroups['sysop']['approved'] = true;
$wgRemoveGroups['sysop']['approved'] = true;
Note that removing the edit permission also stops non-approved users from doing most things that directly or indirectly involve changing pages in any way, so you shouldn't need to revoke those rights explicitly.
Also, instead of revoking editing rights from unapproved users completely, you could restrict their editing to certain namespaces using $wgNamespaceProtection (and perhaps further to certain pages in those namespaces using normal per-page protection), something like this:
// Limit editing of the main namespace to approved users
$wgNamespaceProtection[NS_MAIN] = array( 'edit-main' );
$wgGroupPermissions['approved']['edit-main'] = true;
That way, you could set up a page where new users can ask to be approved in one of the namespaces they can edit.
For more information, see Manual:User rights and Help:Assigning permissions on mediawiki.org.
If you're willing to install an extension then Extension:ConfirmAccount would be the best solution for you.
"The ConfirmAccount extension disables direct account creation and requires the approval of new accounts by a bureaucrat"
This means that new users are clearly told within the interface, that they are requesting a user account. It also presents a specially designed interface to the administrators, for approving the requests, and will email somebody (configured email address $wgConfirmAccountContact) when somebody's waiting.
Although spammers can still irritate you a little by requesting accounts (use in conjunction with ConfirmEdit captcha is recommended), they will not be getting as far as actually creating junk user accounts.