Trying to find a C# script that will list me all the groups of Current Web for sake of webpart that will show users the groups and users having permission to a specific web.
I know I can get all the users by following code,
foreach (SPUser user in SPContext.Current.Web.Users)
{
}
but then how can I actually access the Permissions List and then Access the properties of the Items.
I find this relevant webpart which is related to what I want but, its listing all the webs a user have access to, In my case I want to List all the Users/Groups have access to the Site
Cheers