ifhasrights in a data view web part - what am i doing wrong?

I have applied 2 different securities to 2 columns in a normal list using this table of codes, I have used SPD 2013

http://sharepoint.indigoreality.com/2012/05/04/sharepoint-2010-ifhasrightspermissionmask/

The types of permissions will be full rights, approver and contributor. For Full rights I have used the code 16777216 while for the approver 16. I have placed the ifhasrights correctly in the editform, displayform and viewform and they do work in the form. I thought that the 'hiding' of the columns would work also in the allitems view of the list but it isn't. The contributor still sees all columns.

So I read that I had to place the list in a DVWP in a webpart page, is that mandatory?

Once I have done it, with great difficulty I have opened up the page in SPD, showing the asp tags and even if I localized the portions of the different columns I was not sure where to place the ifhasrights tags. Not having the split view in SPD is not helpful.

Can someone explain to me

1) if it is normal that even tho the 'hiding' of fields is correct on the forms, it is not on the list

2) where to place those xml tags.

Thanks


April 10th, 2014 9:19am

Hi,

According to your post, my understanding is that you wanted to use ifhasrights in a data view web part.

You need to enclose the section that you want to hide in this tag:

<xsl:if test="ddwrt:IfHasRights(2048)">

</xsl:if>

More information:

Security Trim of a Data View Web Part

Best Regards,

Linda Li

Free Windows Admin Tool Kit Click here and download it now
April 10th, 2014 11:34pm

I have done it but it does not work, in the xml long list of lines (more than 1800 lines) I assumed I placed them in the right place, but even the 'contributor' can see all the columns.
April 11th, 2014 4:22am

Since I do not have the split view in SPD it is already difficult to understand if I placed them in  the right section, or in the right position. I have read millions of pages with those tags, yet, I have seen not a single page explaining clearly where to place them. They all assume you have the split view in SPD and can 'select' the box on the WYSIWYG view.
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2014 4:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics