0

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.

3

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

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.