Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Copying Membership from parent to subsite

  Asked By: Evelyn    Date: Feb 12    Category: Sharepoint    Views: 1363

I want to Copy the Membership from the parent site to a newly created
subsite in WSS.

I have been trying the Permissions object etc to little avail (exception

It seems I am confused about Permissions, SPUser and SPMember.

I can't believe I am the first one to need to do this (that is create a
subsite without inherited rights and then add the parent's membership).

Anyone have a model loop or suggestions thereto?



2 Answers Found

Answer #1    Answered By: Sheena Ray     Answered On: Feb 12

I kind of changed my design and solved the problem. What I did was to
create cross site  groups at the top level and when I create  sites
(programmatically) add  the site groups to the newly  created site in the
appropriate SPRole. Its probably a more sound solution anyhow as users come
and go.

I think I figured out the users and membership  thing though. Can someone
confirm that the potential user list is site specific? That is to add
security for a user (add a SPUser to an SPRole) that one would have to
create a membership for them in that site?

In other words, is the SPMember object  site specific? I mean it seems so
except when the SPMember is a cross site group.

Answer #2    Answered By: Gopal Jamakhandi     Answered On: Feb 12

SPMember is the base class for SPUser, SPRole (Site Group), and SPGroup
(Cross Site Group). However, the base class implements very little
functionality, just an ID if memory serves. So, you will likely need to
cast any instance of SPMember.

Didn't find what you were looking for? Find more on Copying Membership from parent to subsite Or get search suggestion and latest updates.