Disable "Invite user" option when creating new users
Hi,
When a e-mailaddress and a smtp-server is configured in web.config, the "Create user"-button in the users-section is replaced by a dropdown-button and the default option is "Invite user".
We use Active Directory authentication for our project so we don't want to invite users and let them create their own password.
Is it possible to disable the "Invite user" option?
Just having a look in the source, currently it's all based on having the mail settings filled out. If it's present it will always show. No override.
One idea, to get around this, which would require some slight re-structure within your project would be to break the smtp into it's own config with a different name.
But of course you do lose some core functionality like sending password resets etc.
This definitely should be a feature request. I think having an app setting labelled something along the lines of 'Umbraco.Core.SendInvites'.
I was able to get rid of the "Invite User" button by editing the umbraco.controller.js file. In the umbraco.controller.js file, find the following if statement.
//don't show the invite button if no email is configured
if (Umbraco.Sys.ServerVariables.umbracoSettings.showUserInvite) {
vm.defaultButton = {
labelKey: 'user_inviteUser',
handler: function () {
vm.setUsersViewState('inviteUser');
}
};
vm.subButtons = [{
labelKey: 'user_createUser',
handler: function () {
vm.setUsersViewState('createUser');
}
}];
} else {
vm.defaultButton = {
labelKey: 'user_createUser',
handler: function () {
vm.setUsersViewState('createUser');
}
};
}
And change it to
//don't show the invite button if no email is configured
if (false) {
vm.defaultButton = {
labelKey: 'user_inviteUser',
handler: function () {
vm.setUsersViewState('inviteUser');
}
};
vm.subButtons = [{
labelKey: 'user_createUser',
handler: function () {
vm.setUsersViewState('createUser');
}
}];
} else {
vm.defaultButton = {
labelKey: 'user_createUser',
handler: function () {
vm.setUsersViewState('createUser');
}
};
}
The above sets the if statement to always be false. Therefore, the "Invite User" button will never be seen...even if you update the default smtp from attribute in the web.config file.
Disable "Invite user" option when creating new users
Hi,
When a e-mailaddress and a smtp-server is configured in web.config, the "Create user"-button in the users-section is replaced by a dropdown-button and the default option is "Invite user".
We use Active Directory authentication for our project so we don't want to invite users and let them create their own password.
Is it possible to disable the "Invite user" option?
Best regards,
iNETZO
Just having a look in the source, currently it's all based on having the mail settings filled out. If it's present it will always show. No override.
One idea, to get around this, which would require some slight re-structure within your project would be to break the smtp into it's own config with a different name.
But of course you do lose some core functionality like sending password resets etc.
This definitely should be a feature request. I think having an app setting labelled something along the lines of 'Umbraco.Core.SendInvites'.
I was able to get rid of the "Invite User" button by editing the umbraco.controller.js file. In the umbraco.controller.js file, find the following if statement.
And change it to
The above sets the if statement to always be false. Therefore, the "Invite User" button will never be seen...even if you update the default smtp from attribute in the web.config file.
Thanks Trey, I choose a diffrent method by creating an interceptor, so I didn't had to change the original code.
is working on a reply...