Question: I am using sharepoint 2010. I have created some reporting service report. On some page, I have created the PerformancePoint webpart to show the reporting service report. It works and shows content. But when I change the data and go again to the page with the performancePoint webpart, it shows the old content. It looks like it shows the cached content. When I open this page on another tab I have the same issue. When open a private session it works fine, I can see the latest content.

It looks like there is some caching on the session.

How can I fix this reporting service caching issue?

ps. I have turned off the toolbar from this report

Answer: 
Use `EffectiveBasePermissions` to get permissions of the user on a list. Example:

```
http://aissp2013/sites/Team/_api/web/lists/getbytitle('L2')/EffectiveBasePermissions

```

Note that this will give the permissions of the logged in user. However, if the need is to check for other users permission while being logged in using as a different user then as suggested by @Amit, use `getusereffectivepermissions`. In any case the end result is high and low permission masks which don't make much sense and a way to decipher what permissions a user has is to use `SP.BasePermissions().has` as can be seen in below example:

```
function checkPermissions() {
    var call = jQuery.ajax({
        url: _spPageContextInfo.webAbsoluteUrl +
            "/_api/Web/effectiveBasePermissions",
        type: "GET",
        dataType: "json",
        headers: {
            Accept: "application/json;odata=verbose"
        }
    });

    call.done(function (data, textStatus, jqXHR) {
        var manageListsPerms = new SP.BasePermissions();
        manageListsPerms.initPropertiesFromJson(data.d.EffectiveBasePermissions);

        var manageLists = manageListsPerms.has(SP.PermissionKind.manageLists);

        var message = jQuery("#message");
        message.text("Manage Lists: " + manageLists);
    });
}

```
You could consider the following approach to get *List permission levels/roles*: 

* get the List effective permissions using `/_api/web/lists/getbytitle('<list title>')/getusereffectivepermissions` endpoint
* determine user roles using [SP.BasePermissions.has(perm) Method](https://msdn.microsoft.com/en-us/library/office/ee659513%28v=office.14%29.aspx)

**JavaScript example**

```
function getListUserEffectivePermissions(webUrl,listTitle, accountName) 
{
    var endpointUrl = webUrl +  "/_api/web/lists/getbytitle('" + listTitle + "')/getusereffectivepermissions(@u)?@u='" + encodeURIComponent(accountName) + "'";
    return $.getJSON(endpointUrl);
}

function parseBasePermissions(value)
{
    var permissions = new SP.BasePermissions();
    permissions.initPropertiesFromJson(value);
    var permLevels = [];
    for(var permLevelName in SP.PermissionKind.prototype) {
        if (SP.PermissionKind.hasOwnProperty(permLevelName)) {
            var permLevel = SP.PermissionKind.parse(permLevelName);
            if(permissions.has(permLevel)){
                  permLevels.push(permLevelName);
            }
        }     
    }
    return permLevels;   
}

```

**Usage**

```
var webUrl = _spPageContextInfo.webAbsoluteUrl;  
getListUserEffectivePermissions(webUrl,'Documents','i:0#.f|membership|jdoe@tenant.onmicrosoft.com')
        .done(function(data){
            var roles = parseBasePermissions(data);
            console.log(roles); 
        });

```

**Result**

```
["emptyMask", "viewListItems", "addListItems", "editListItems", "deleteListItems", "openItems", "viewVersions", "deleteVersions", "managePersonalViews", "viewFormPages", "open", "viewPages", "createSSCSite", "browseDirectories", "browseUserInfo", "addDelPrivateWebParts", "updatePersonalWebParts", "useClientIntegration", "useRemoteAPIs", "createAlerts", "editMyUserInfo"]

```