Separate users within site collections

Sep 24, 2015 at 12:48 PM
Thanks for the pack. Great one. And works perfectly.

The only default ,for my usage, is that on each site collection where the feature is deployed, we can see all the users (I know that seeing the users doesn't mean the can access the site collection, that's not my purpose). I'd rather see only the users created for each site collection. I understood that through only one provider with one Appname (and one database but that's not the problem I think), this is the normal behaviour. But do you think it would be difficult to add a column in the database with the site collection URL, add the URL of the site collection when adding the user from the site collection and filter the users with this column when you display it on the FBA management user page ? Do you think there would be a simplier solution to do that (seeing only the site collection users) ? SharePoint is limited to 4 web app extensions (+ default zone) (I could define extensions with different providers) and I don't want create a lot of web applications either (IIS pool applications limit). I work in a really big firm and I could have many of this kind of applications.

Sep 24, 2015 at 3:48 PM
The easiest way to go about it would be to create separate web applications for each site collection, but since that doesn't work for you, there are two other solutions I can think of:

1) If seeing the user is the only thing you want to modify, you could modify the FBA Pack to filter the users list down to users that already exist in the site collection. There's a couple of issues with this: if an existing user in the db (but not the site collection) logs in to the site with his credentials - he will be added to the site collection - he'll be denied access to the site collection - but will be added to it and included in the list. Additionally you could run into issues with errors regarding duplicate users - if you try to add a user that already exists in the db.

2) The only FULL solution I can think of is to extend the membership provider. So you would add another field to the database for the site collection, and then you'd have to inherit the existing membership provider and modify all applicable methods. I don't know if I'd consider this difficult (I wouldn't consider it simple though) - it would definitely be time consuming though.
Sep 28, 2015 at 8:51 AM
Thanks for the advice.