问题
I've already set up Membership and Role Providers in SP2013 and a custom login page for FBA. I can login as one of my FBA-based users, so I know the connection to the database works. However, I'm really struggling trying to incorporate my FBA-based roles into SharePoint. How do I map "FBARole1", for example, to the SharePoint "Owners" group for my site, such that anyone I put into "FBARole1" will automatically be an owner of the site?
I go into Site Settings-->Site Permissions. I click on "Grant Permissions". It asks me to enter names, email addresses, or "Everyone". Makes no mention of roles. I enter any of my role names and it won't resolve it. It can find my FBA users, just not my FBA roles. I can't think of any other place in SP to do this.
I've verified that my role provider "plumbing" works. I have a web part that checks roles for the logged in user, and it's finding them just fine. So, best I can tell, I'm just missing where in the UI this association gets made.
Again, this is 2013. Any help would be appreciated. Thanks!
回答1:
Well, I'm not sure I get it, and this doesn't give me the "warm fuzzies", but here's what I know...
I went back to that dialog box to enter usernames, email addresses, or 'Everyone'. I found a link that recommended entering the "complete" info for my role provider instead of just the name, so I tried it. I entered it in the format of {Role provider name}:{role name}. Lo and behold, it finally resolved.
A few things are weird about this. 1. From that point on, I have been able to enter the {role name}, skipping the name of the role provider and the colon, and it resolves. It didn't beforehand. 2. If I enter the entire {role name}, it now finds it in search. Before, it didn't. And, if I hit the backspace key so it's not the ENTIRE {role name}, the search won't find it. So, if my full role name was "FBARole1", it'll resolve. If I enter "FBARole", it'll say there are no matches.
Weird, but that's SharePoint 2013, I guess!
来源:https://stackoverflow.com/questions/18338515/mapping-fba-roles-to-sharepoint-groups-in-sharepoint-2013