Hide/Remove the site contents and site settings on user site (sharepoint 2013) RRS feed

  • Question

  • The mysites by default is created by user itself,  and all the user have owner permissions so they can do every thing on the MySite like open the site content and site setting so please how i can change this permission should i delete the user profile service application and edit the permission before ???

    • Edited by Kadomi Monday, May 18, 2015 12:55 PM
    • Moved by Hemendra Agrawal Thursday, May 21, 2015 11:19 AM SP 2013
    Monday, May 18, 2015 7:34 AM


  • Hi Kadomi,

    From your description, my understanding is that you want to restrict your users to access site content and site setting pages.

    You could use CSS code to hide site content and site settings, please refer to this code below:

    <style type="text/css">
    a[title='Site contents']
    a[title='Site settings']

    You could restrict users to access these pages with http module check if current URL contains the URL of site these pages, if current URL contains the URL of site content or site setting you could redirect to a new page to warn uses that they do not have permission to access this page.

    you could refer to this code below to check current URL in http module:

    if (HttpContext.Current.Request.Url.AbsoluteUri.Contains(“_layouts/15/viewlsts.aspx”)||HttpContext.Current.Request.Url.AbsoluteUri.Contains(“_layouts/15/settings.aspx”))
                    HttpContext.Current.Response.Redirect(“special page”);

    Please refer to this article about how to use http module in SharePoint 2013:

    SharePoint & Http Module Example


    Best Regards,

    Vincent Han

    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Dennis Guo Tuesday, May 26, 2015 9:16 AM
    • Marked as answer by Dennis Guo Thursday, May 28, 2015 2:00 AM
    Friday, May 22, 2015 1:56 PM