Sitecore displays error message to the user on login page , if authentication fails. During production window or any other uncertain condition , we might want to restrict all the content authors from login to Sitecore except admin and display our own custom message like – “Production deployment window. Please try after some time.” For the same we can provide checkbox option to admin to restrict or allow content authors to login to Sitecore.

Follow steps –

  1. Create new dictionary item under item /sitecore/system/Dictionary/ in core database for error message.
    core - dictionary item
  2. Provide an an option to admin to restrict all internal users except admin.
    checkbox option
  3. Extend Login default.aspx page to write custom login to check condition i.e. if internal users are blocked then display error message else continue with default login process.
    Update inherit attribute –
    Login aspx
    Class Details –
    CustomClass
  4. If user tries to login other than admin , following message will be displayed –
    custommessage

Happy Learning 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *