When you create a content item or a page in Sitefinity CMS, you, as the user performing the operation, are associated as the owner of the newly created item. You can change the owner of a page but you cannot change the owner of a content item. in Sitefinity CMS backend. For more information about how to change the owner of a page, see Administration: Share a link to a page to unauthorized users.
In this article, you will learn how to change the owner of a page and of a content item programmatically and associate a new user as an owner.
NOTE: When changing the owner of a content item or a page, the permissions for that resource are not modified. If a user is not able to view or edit a resource due to permission restrictions, associating this user as an owner does not elevate his privileges.
To change the owner of a page programmatically, refer the following example:
In the code above, you get the following:
Next, you associate the ID of this user with the Owner property of the page node and the page data. To get the page data, you call the GetPageData method of the page node. As a result, after saving the changes, the newly associated user is the owner of the page.
The following example demonstrates how to change the owner of a content item:
Next, you associate the ID of this user with the Owner property of the content item. As a result, after saving the changes, the newly associated user is the owner of the content item.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important