'RootWeb Nur Eigenschaft einer benutzerdefinierten Aktion funktioniert nur in Sandkastenlösungen?Warum?

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/50929

Frage

Ich habe eine WEB-Anwendungs-SCAPED-Funktion, die eine Reihe von Site-Sammlungen und Unterten bereitstellt.

Die Funktion enthält auch ein Navigationselement, das der Site-Settings-Seite eine neue Custom-Aktionsgruppe hinzufügt. Was ich möchte, ist für diese benutzerdefinierte Gruppe, nur auf der Settings-Seite des RootWeb der Site-Kollektion anzuzeigen (Art von der Gruppe "Site Collection Administration" -Gruppe).

Mein Ansatz bestand darin, "roofwebabonly=" true "'für jede Customaction in der Gruppe zu verwenden. Leider scheint es, dass diese Eigenschaft keinen Effekt hat, wenn Sie eine landwirtschaftliche Lösung einsetzen. Gibt es dafür eine Problemumgehung? Dies scheint sehr inkonsistent und ich kämpfe immer noch zu verstehen, warum es nicht funktionieren würde, aber anscheinend ist es so, wie es ist: http://msdn.microsoft.com/de-us/library/ms460194.aspx

Gibt es einen anderen Weg, um es so zu bekommen, wie ich will? Ich würde es vorziehen, keine weitere Merkmale für dieses Element hinzufügen zu müssen; Meine Lösung hat eine große Anzahl von Funktionen wie es ist.

War es hilfreich?

Lösung

I totally agree that this is inconsistent and a bit misleading. Assuming that tranforming the solution to the Sandbox is a none starter, a few thoughts...

  1. You could maybe re-scope the feature to the Web (I'm assuming that it is currently the scoped at the Site) and the just activate it on the root web. That would probably raise another issue though as I suspect that you don't want the feature to show up in the list of available features for each web. To get round that you could make the feature hidden and then activate by PowerShell or whatever on the root web only. However, I suspect you won't really like that idea (it's a bit ugly).

  2. Just have the GroupId of your custom action set to SiteCollectionAdmin that way it shows up in the Site Collection Admin group and will only show up on the root web. However, suspect you want a number of links and don't want to pollute the SiteCollectionAdmin group (hence the need for a custom group) so that won't cut it.

  3. A spin off idea is just place one link in the SiteCollectionAdmin group and send your user to a custom application page which just houses your links. The draw back of this is that it requires an extra click-through but the up side is that you can now do much more on your launch page than you could every do in a you elements file e.g. selectively show/enable items according to the specific user, as you've got full code behind access to the OM.

  4. (This is what I did to work around the work round this issue). Create your custom group and add the custom actions as required. Then set the Rights attribute of every custom action in the group to be ManageWeb (or Full Mask). The effectively means that your custom actions are all only accessible to site collection admins. If all custom actions in the custom group are inaccesible to the end user then the custom group won't show up (what's the point in showing and empty group). The effect of this is that the custom group will only show up for Site Collection Admins. Although your custom actions will still show up if a Site Colection Admin drills into site settings of a sub web they won't show up for a user who is only an admin/owner at a sub-web only.

Option 4 is the way I'm going as I reckon showing the custom group for Site Collection Admins is no real shakes and actually might be useful rather than having to go back up the tree to Site Collection settings.

I hope that helps

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top