Elevated privileges in javascript

In SharePoint, when I need to perform an action when the user does not have permission to do this, I use:

SPSecurity.RunWithElevatedPrivileges(delegate() 
 {
// DO SOMETHING WITH PRIVILEGES 
});

But now I need to run JavaScript with elevated privileges:

var context = new SP.ClientContext.get_current();
context.executeQueryAsync(); // NEED PRIVILEGES TO WORK

Is it possible?

+3
source share
2 answers

No, It is Immpossible.

The user will be able to manipulate JavaScript, which will open a huge security gap. You can just do it server side. If you need something like this, all of this should happen on the server.

+7
source

, JavaScript, , . , , - No-code Designer. SP2010 - , , , . .

+1

All Articles