0

We are using SharePoint Online and we are just setting it up for our users. We have tenant/sites for team document site and we would like to use tenant/teams for people to use as team sites.

But here is the issue, we do not want to allow people to create libraries in their team sites but do want to allow them to create lists.

Is there any way that I can remove the library apps from the "Apps You Can Add" list?

0

Since its SharePoint Online we don't have much option. Ideal solution is to update the Site Templates and remove it from there.

To tackle this you can add following JavaScript code into

<script type="text/javascript">
    function AlterStorefront() {
        if (SP.Storefront != undefined) {
            var listedApps = SP.Storefront.StorefrontApp.get_currentView();
            if (listedApps == undefined || listedApps.$2i_3 == null || listedApps.$L_3 == null) { setTimeout(AlterStorefront, 750); return; }

            listedApps.$2i_3.length = 0;

            for (i = 0; i < listedApps.$L_3.length; i++) {
                if (listedApps.$L_3[i].$2Q_0.Title == "Document Library") {
                    listedApps.$L_3.splice(i, 1);
                }
                if (listedApps.$L_3[i].$2Q_0.Title.indexOf("Insite") > -1 || listedApps.$L_3[i].$2Q_0.Title == "Icon Links Grid") {
                    listedApps.$2i_3.push(listedApps.$L_3[i]);
                }
            }

            SP.Storefront.StorefrontApp.get_currentView().updateUI();
        }
    }

    SP.SOD.executeFunc("sp.js", "SP.Storefront", AlterStorefront);
</script>

https://spmatt.wordpress.com/2014/05/21/hiding-the-out-of-the-box-document-library-in-sharepoint-2013/

1
  • That is brilliant, thanks Amal. I shall try this in my test site today.
    – Barry Long
    May 20 '15 at 14:05
0

Sorry, but: NO

In the end libraries are lists too, just "better ones" which Support files, but in the end they have the same functionality (Columns, Rights, ...).

No way to remove their permission to add a document libray (at least in Office 365). All you could do is to hide the button using JavaScript (as mentioned above), but after all, the user is still ALLOWED to add a document library (eg by using the Javascript-ClientObjectModel in the browser.

1
  • Good point Leopold, I had forgotten about this. Been spending to much time doing back end stuff!
    – Barry Long
    May 20 '15 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.