Try our conversational search powered by Generative AI!

Page creation by system user

I am using the task function (Schemalagda jobb) in EPiServer to automatically create pages in certain intervals. This is working great when I click the "Provkör manuellt" button, but the automatic function throws a "Access was denied to page" error. It seems to be a user right issue. The manual function uses my user account without restrictions while the automatic function uses the system account for the task service without necessary rights. What can I do to give the system account necessary rights to create pages automatically? I can see two solutions which both open for a great security leak: 1) Give Create rights for everyone to the page container. 2) Add the system account to the Administrators group. /René
Aug 05, 2005 11:27
Hi. The DataFactory.Save method has an overload which takes in the parameter AccessLevel Access: public PageReference Save(PageData page,SaveAction action,AccessLevel access) You will find the access level you need to save the page in the static member called NoAccess in the class EPiServer.Security.AccessControlList, hence if you enter EPiServer.Security.AccessControlList.NoAccess as the input for the Save method, you will be able to save the page regardless the security settings. Frank :)
Aug 05, 2005 13:11
Thanks for your suggestion, unfortunately this solution is not solving the access rights problem. It seems to be the access right for the container page that is messing up, the AccessLevel in the Save method seems to affect the access right for the "newly created" (never created) page instead.
Aug 08, 2005 11:30
Smooth, now it works, I had to set the AccessLevel in the Global.EPDataFactory.GetDefaultPageData too. ;)
Aug 08, 2005 12:03
You need to personate as a user with the neccessary rights to do the things you're trying to do. Do the same as shown in, but use an account with more rights.
Aug 10, 2005 13:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.