Try our conversational search powered by Generative AI!

Page creation by system user

Vote:
 
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é
#12326
Aug 05, 2005 11:27
Vote:
 
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 :)
#14063
Aug 05, 2005 13:11
Vote:
 
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.
#14064
Aug 08, 2005 11:30
Vote:
 
Smooth, now it works, I had to set the AccessLevel in the Global.EPDataFactory.GetDefaultPageData too. ;)
#14065
Aug 08, 2005 12:03
Vote:
 
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 http://www.episerver.com/templates/faq____943.aspx, but use an account with more rights.
#14066
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.