New features
Version 3.x > New features > Each page should be able to accept child documents of certain type(s) only! View modes: 
User avatar
Member
Member
John - 1/31/2008 4:14:32 PM
   
Each page should be able to accept child documents of certain type(s) only!
It would be very useful and clear for CMS editors if they could only add certain type(s) of documents in every page.

thanks,

John


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/4/2008 9:57:23 AM
   
RE:Each page should be able to accept child documents of certain type(s) only!
Hi John,
This is possible to set in the Site Manager -> Development -> Document types -> edit appropriate document type -> Child types -> and here you can specify which document types are allowed to be placed underneath the node of this document type.

User avatar
Member
Member
jsalichos@gmail.com - 2/4/2008 10:19:07 AM
   
RE:Each page should be able to accept child documents of certain type(s) only!
Hi Jurajo,

I'm aware of that but I mean Not the Page Type but the Page instance.

This way, cmseditors could only create permited child pages under a certain page.

As it is right now, a cmsEditor, must select one among all types of pages, when he is about to create a page under a PageItem. This tends to be a little bit confusing for the non expirianced ones.

thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/7/2008 4:55:04 PM
   
RE:Each page should be able to accept child documents of certain type(s) only!
Hi again,
I think I understand what you mean. But, I think when the document types would be named with appropriate name, the user should know what he/she wants to create and would not create a restaurant item under hotels. I know, this is only a small example and there could be much more allowed page types. Moreover, you can use our API to develop a custom provider which will check the current user (e.g. CurrentUser property in CMSContext class) and will display only allowed document types.

Best Regards,
Juraj Ondrus
Support Engineer

User avatar
Member
Member
info@kearnytech.com - 2/8/2008 1:33:05 AM
   
RE:Each page should be able to accept child documents of certain type(s) only!
I would really like to see some example of how to "develop a custom provider which will check the current user (e.g. CurrentUser property in CMSContext class) and will display only allowed document types".

Can you point me to some examples?

Charles

User avatar
Member
Member
jsalichos@gmail.com - 2/8/2008 10:32:07 AM
   
RE:Each page should be able to accept child documents of certain type(s) only!
Me too, but I'm actually talking about "develop a custom provider which will check the current user and MOTHER PAGE and will display only allowed document types".
Any way I think it would be very useful if it was a standard feature of Kentico CMS. I believe it is easy to implement and very nice to have.

John

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/12/2008 5:19:19 PM
   
RE:Each page should be able to accept child documents of certain type(s) only!
Hi,

here is a simple example of the code how to chceck current user:

if (CMSContext.CurrentUser.IsAuthorizedPerResource("<module name>", "<permission_name>"))
{
<display only appropriate types>
}
else
{
<access denied or display another types>
}

I have also discussed this feature with our developers. We will consider this feature in some of future versions.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/12/2008 6:41:40 PM
   
RE:Each page should be able to accept child documents of certain type(s) only!
Hi again,

I have just realized that you can also try to use this method:

CMS.CMSHelper.CurrentUserInfo.IsAuthorizedPerTreeNode(TreeNode, NodePermissionsEnum)

Checks whether the user is authorized for the given document and permission, returns the authorization result

User avatar
Member
Member
info@kearnytech.com - 2/12/2008 7:10:40 PM
   
RE:Each page should be able to accept child documents of certain type(s) only!
That is good information and probably would have been a follow-up at some point, but I guess what my real question is...

What custom providers do I need to implement to add this functionality?

I have implemented Custom Search Providers and Custom Ecommerce Providers, and I recall there being some Custom Email Providers and and Custom Data Providers. But I don't recall seening any document Custom TreeView or Document or something else providers.

Basically when a user if logged into CMS Desk and they have selected a Page Type Document node called News (and news documents are the only document they have permissions too), I only want them to see the document type news.

Also I'd like to see the same think in Tools and My Desk. When a logged on user goes to Tools tab and all they have access to is Newsletters, I don't want them to see Web Analytices, or Ecommerce, or Reporting, etc. - This is actually a bigger wish of mine rather then being able to limit the document types based on the page and/or user.

Charles

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/13/2008 1:32:14 PM
   
RE:Each page should be able to accept child documents of certain type(s) only!
Hi again,
I am sorry for the confusion. I did not mean the provider in the way you described. I meant come custom code on the page which is displaying the available document types. You can place the code in its code behind file.

Regarding to the displaying only news document types and also for the tools section: more information about the permission settings is available at http://www.kentico.com/docs/devguide/authorization_permissions.htm

Best Regards,
Juraj Ondrus
Support Engineer