Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Creating Global Memberships and staging View modes: 
User avatar
Member
Member
JAA - 1/8/2014 7:44:58 AM
   
Creating Global Memberships and staging
If I create a global membership, do I need to stage the global object within each site to have access or if I stage the global object one time it will be available for all sites?

User avatar
Kentico Legend
Kentico Legend
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

User avatar
Member
Member
JAA - 1/9/2014 2:33:02 PM
   
RE:Creating Global Memberships and staging
FroggEye wrote: 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

Thanks for the feedback.

Im circling around how to manage global objects vs site specific objects. Part of what I will be tackling is governance standards around how vendors integrate with our product. I want to make sure global objects are closely guarded as they run the risk of having cross site impact.

Thanks again

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/9/2014 2:55:29 PM
   
RE:Creating Global Memberships and staging
Makes sense. You could also set some permissions to allow access to items based on roles. This can be done pretty easy. There is a new webpart you can check out that will allow you to restrict access to webparts by role now.

One other thing you might do is create a module that allows you to set permissions for individual roles/users/vendors. This would essentially set the permissions I mentioned above. As you've found out you need to be careful on what you edit because it could have sever affects to other areas.

I like to start with a clean, blank site and remove all the references to items/objects that aren't needed and add them as I need them. This gives me something clean to work with. Then if a client needs something additional that is already built-in, I simply assign it to that site. BUT if they don't have access to it in the first place, they won't know its missing. This might help some of the issues you're running into.