Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

A particular script does not execute for a User with full control access to the SharePoint online site.

$
0
0

The code below only executes if the user is a member of site collection admin. How can I modify the code so that it runs for users with Full control as well as Read/Write please?          

var clientContext = SP.ClientContext.get_current();

// Fetch all groups because I can't just grab those for this subsite.
    this.collGroup = clientContext.get_web().get_siteGroups();
            clientContext.load(collGroup);
    clientContext.load(collGroup, 'Include(Users)');

    clientContext.executeQueryAsync(Function.createDelegate(this, function() { 

         var groupsInfo = '';  
            var groupsEnumerator = collGroup.getEnumerator(); while (groupsEnumerator.moveNext()) {  
             var oGroup = groupsEnumerator.get_current(); 
              //  alert(oGroup.get_title()); 

Also, The code will create the SharePoint group if it does not exists. 

How can I force these codes to run for users with Full and Edit rights?


faye fouladi



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>