Scenario
You are working on a client-side script SharePoint App. You need to check whether the current user belongs to the Approvers group. The twist is that the current user is added to an AD Group and in turn the AD Group was added to SharePoint group.
Solution
The following is the REST code to get the result.
http://sharepoint/_api/web/sitegroups/getbyname('Approvers')/CanCurrentUserViewMembership
The following is the result.

Note
You can try the REST code in browser address bar itself. Later you can wrap a JavaScript or AngularJS around it to attain programmatic checking.
If I enter an invalid group name, the result will be different.
http://sharepoint/_api/web/sitegroups/getbyname('InvalidGroup')/CanCurrentUserViewMembership

We can also check Site Collection & Sub Site permission groups using the same way.
Pre-Conditions
The above code is checking does the user have View Membership permission. In order to make this work we need to configure the following group property as true.

By default this property will be true.
Note
You can find more property information using References link.

References
Summary
In this article we explored the REST API to check User Permission for a Group.


Jean PaulTOP 100Posted Nov 4, 2015, 3:56 AM EST
Deepak, It won't work in that case.
Jean PaulTOP 100Posted Nov 4, 2015, 3:56 AM EST
Thank You all dear friends.
Deepak SolankiPosted Nov 3, 2015, 9:09 PM EST
Good one, thanks. What if membership is visible to 'Everyone'. Should it work in that case as well?
Priyaranjan K STOP 100Posted Oct 26, 2015, 4:27 AM EDT
Good One Jean ..
Mukesh KumarPosted Oct 26, 2015, 4:17 AM EDT
Nice One
Nilesh JadavPosted Oct 26, 2015, 2:49 AM EDT
Thank you for sharing sir