0

I created SharePoint-hosted app. When it is installed a new web is created. I would like to break role inheritance for this web and configure own groups.

I found out that I can perform these actions by JS. But my solution is ugly and I'm looking for correct way. Do you have any ideas?

2
  • What is your current solution? What else have you tried? To do something in an automated fashion in a SharePoint hosted app, your only code option is JS.
    – Brian P
    Sep 19 '13 at 13:44
  • @BrianP, My solution is to put JS code by custom action on all the pages of web. This code checks if it is run first time it setups permission.
    – Alexander
    Sep 19 '13 at 17:33
0

I found these Apps for SharePoint UX design guidelines. It says:

In some cases, the app will require certain information or choices to be provided before the app can function. When your app requires information before it can function, you should provide a user experience that guides the user to the settings page to update the configuration.

You should add the settings page URL to the app’s top-right menu if appropriate so that users can find it easily. If your app has a getting started experience or other settings, you can add those also. For more information, see How to: Use the client chrome control in apps for SharePoint.

0

The easiest way that I have found to do something like this is to create an "Initialization" page. I am currently using one to configure the app web on first run as well as configure the user session on each run. Then set the app redirect page to the initialization page and you are all set.

Since you are primarily concerned with first run, this will work for you every time because the user will not have the URLs to hit an internal page before the first run.

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.