Вопрос

This is my first attempt at security trimming in SPO. I have the following requirement. In a content editor webpart there`s some html code that presents links. One of them, I'd like to be security trimmed so that it's only presented to those users with either a specific permission level or preferrably to those that are in a specific SharePoint group.

I'm not a sharepoint developer but have access to SP Designer. I already opened the affected .aspx page there and I was able to locate the code that I want to be security trimmed. It looks like this:

<h5>
<i class="fa fa-plus-circle"></i>&nbsp;<a onclick="var options = {width: 600, dialogReturnValueCallback: function(dialogResult){if(dialogResult===1) alert(&#39;sampleDisplayText\n\ndisplay text changed&#39;)}, url:&quot;sampleUrl/NewForm.aspx?settemplate=2&amp;setworkspaceicon=6&amp;ContentTypeId=0x010007E5680AA3F69C42AD7208CCC1E43CA30021F688005EE3454EA6FB978EE893D9F4&amp;RootFolder=%2FLists%2FWorkspaces&amp;IsDlg=1&quot;};SP.UI.ModalDialog.showModalDialog(options);" href="javascript:">Neue 
sampleDisplayText</a>​​<br/>​<br/></h5>

So basically what this code does is the following. On the live .aspx page it presents a clickable icon with text that calls a new form dialog to allow user input.

I want this to be security trimmed.

Is this possible? I read a little bit about SPSecurityTrimmedControl but I'm overwhelmed with the context in which it is used.

Thanks a lot for your help.

Это было полезно?

Решение

Short answer:

Not supported

Longer Version: Add a list with links, trim the items in the list and add a list Webpart to the page

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top