sympmarc / SPServices

SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permissions issue with 'View Application Pages'

ianoel230982 opened this issue · comments

Hi,

Recently uncovered an issue that seems to be related to SPServices in some way. Unsure whether it is SPServices causing this or something else, but here is the issue i encountered.

When trying to use some basic SPServices functionality like obtaining logged on user i have found that it does not work if a particular sharepoint permission has been removed for the logged on user. The permission in question is "view application pages - view forms views and application pages. enumerate lists."

my code is set up to console log the logged on user with the following code......
var loggedOnUser = $().SPServices.SPGetCurrentUser();
console.log(loggedOnUser);

When i use an account that has the 'view application pages' permission, i get the expected result. However if i use an account that does not have that permission, the result is blank. There are no errors or anything.

The purpose of this requirement is to stop particular users gaining access to the layouts folder within sharepoint, according to all the documentation then the 'view application pages' is what to remove to achieve this. Unfortunately the use of SPServices to carry out certain tasks is causing a problem.

Please could some light be shed on what the issue may be?

Thanks,
Ian.

Hmmmm, so i actually looked in the SPServices js file and can see the logged on users details are obtained from the userdisp.aspx in the layouts folder. This would appear to be the answer to my question.