I'm working on a user control that should show all site names, within a given site, for the current FBA user. My site is structured using SP Groups, FBA Roles and FBA users, i.e.
'Harry' is a member of the 'CSAuthors_EN' role, and
'Melvin' is a member of the 'CSAuthors_FR' role and
both these roles are members of the 'CS - Authors' group.
The site that uses this group is: /customers/Authors
'Brandi' is a member of the 'CSAdmins_EN' role, and
'Melvin' is a member of the 'CSAdmins_FR' role, and
both these roles are members of the 'CS - Admins' group.
The site that uses this group is: /customers/Admins
given that I know 'Melvin' is logged into the site (SPContext.Current.Web.CurrentUser), I want to get a list that shows
Sites for 'Melvin' >Authors >Admins
To start I'm using SQL to query the FBA aspnet_UsersInRoles database for all the roles for the current user where the rolename starts with "CS" (i.e. CSAUthors, or CSAdmins). From this I know the RoleName. My thought is that I can then look at each sub-site within /customers/ for a site that has permissions for one of the roles, i.e. the /customers/Admins site has the group "CS - Admins", which has a member of the "CSAdmins_FR" role.
Sounds convoluted, I know - is there a better way? Can my idea even work? I'd appreciate any guidance at all