November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
You can always listen to the content event for publishing and cancel it based on user role / page type as a workaround.
for some examples. It's pretty easy and fast to implement. It would be neat to have some more options to block copy on some page types and not only create.
Thanks for the link Daniel, that helps
I really think that the Access attribute should stop users from copying anything but the types they have access to. This seems like a bug to me, unless someone can explain otherwise. As far as I'm concerned "Copy and Paste" = "Create".
Anyway, something like this might work in certain situations - you can still copy, but not paste:
public void Initialize(InitializationEngine context) { var contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>(); contentEvents.CreatingContent += contentEvents_CreatingContent; } private void contentEvents_CreatingContent(object sender, ContentEventArgs e) { if (e.Content is IChangeTrackable) { if (PrincipalInfo.CurrentPrincipal.IsInRole("SomeRole") && !(e.Content is SomeContentType)) { e.CancelAction = true; e.CancelReason = "You don't have permission to create this type of page."; } } }
I created a page type that has a specific access level - only 'Group1' can create instances of this page.
People in Group2 do not see this page type as an option when creating new pages, however they can still Copy and Paste existing instances of this page type! The copy is then editable by Group2. Is this correct behaviour? It doesn't seem right to me.
Also, is there any way to disable the 'Copy' functionality? What happens if an enthusiastic user copies and pastes an entire, massive website?
Thanks