Avoiding accidentally sending email to user when assigning permission in SharePoint 2013

In SharePoint 2013 when you assign permission to a user you do not want to notify them using SharePoint email notification. This could be for various reason. I am not going to discuss why given that’s not the point.

Now on assign user permission dialog “Send an Email Invitation” checkbox is partially hidden. The reason I say it’s partially hidden is because you do not see the checkbox until you click Show Options link at the bottom of the dialog.

Note:  You will not see the checkbox if you have not configured outgoing email in your farm.

That is why it is very easy to forget to uncheck the checkbox. The downside is that checkbox is checked by default. So if you do not pay attention SharePoint will ended up informing users about them having permission to particular site or a list.

You can avoid this if you could somehow uncheck the checkbox on the assign permission dialog. Please don’t hold your breath as there is no easy option to check/uncheck the checkbox. There are two options that you can use.

1)      Commit the “SharePoint crime”. 🙂

  • Go to C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\LAYOUTS
  • Open aclinv.aspx
  • Find <asp:CheckBox runat=”server” id=”chkSendEmailv15″ Checked=”true” class = “ms-aclinv-checkbox” OnClick=”UpdateSendEmailMessage()”/> and change its Checked property to false and save the file.If you decide to use this option make sure you take the backup of the original file before making any change.Couple of things to note here that you will need to perform this operation on all SharePoint WFE Servers in the farm and this change will be global.

    Biggest thing to keep in mind is that this change is not supported by Microsoft.

2)      Use some jQuery to your rescue

– Download the latest jquery from http://jquery.com/download/ for Production

– Create a JavaScript file and paste the following code in it.

$( document ).ready(function() {

$(‘#ctl00_PlaceHolderMain_chkSendEmailv15’).attr(‘checked’,false);

});

– Reference both files in your custom master page and make sure you set your system master page as your custom master page.
– Save and publish the changes.

 

All credit for the second option goes to Danny from the following thread.

http://social.technet.microsoft.com/Forums/projectserver/en-US/f250aa4a-94f0-4603-9da2-e9040d5d6133/how-to-by-default-uncheck-send-an-email-invitation-when-granting-access?forum=sharepointadmin