Brenden Kehren
-
1/8/2014 8:19:21 AM
RE:Creating Global Memberships and staging
Each object is different. For instance, memberships and roles are similar because you create a new record for each site AND globally. Whereas with a doc type or a webpart you create the global object and then assign which sites have access to it.
Here's what you might see in staging:
Create a new global membership record, creates a global object staging record. You do some more updates to the object and those items are recorded in that existing staging record until is is synchronized. This could be seen across multiple sites staging module as a global change
Create a new site specific membership record, creates a site specific staging record for that particular site. You do some more updates to the object and those items are recorded in that existing staging record for that site until is is synchronized.
Create a new document type, creates a global object staging record. Add a site to the document type and it simply updates the global object (and sync record until is is synchronized) and will not put any site specific sync task in as a staging record.
When you look in the database you might see this:
CMS_Membership MembershipID, Name, SiteID 1, Global Membership, 0 2, Site Membership, 2
In this case, there are 2 membership records, 1 is global, 1 is site specific
CMS_Class ClassID, Class Name 1, CMS.Event 2, CMS.Article
In this case, there are 2 document types but we don't know what site they can be used in.
CMS_ClassSite ClassID, SiteID 1, 2 2, 1 2, 2
In this case we know site 1 has access to events only and site 2 has access to events and articles.
Clear as mud? As I mentioned prior, it's not a clear cut setup that will be a simple task to code an additional check as you're trying. In fact, the more I think about this, what will happen when Kentico adds new features and you need to upgrade? You'll have to add additional logic to check for each of these different features/scenarios which will be a maintenance nightmare. If I could get clients to pay me to simply code myself into a corner and back out, I'd be rich!
Good luck! Brenden
|