SaaS CMS has officially launched! Learn more now.

Scheduling access rights


Hi there,

Is there a way to schedule changes to access rights for pages or folders? Often times I have to prepare a large group of previously published pages that need to go live at a certain time and am forced to have to change permissions to each individual page manually to control access.

Had tried using project but the access rights are set immediately so that didn't seem like an option. I was wondering if there is a plugin or some other approach available for this?

Aug 18, 2021 11:52

Not out of the box, the way access rights works is different than the other changes that can be scheduled. If you want to do this you'd have to build something yourself.

However from the scenario you've described I'm not sure you should be using access rights for this. You should just be unpublishing a page using the publishing settings, then scheduling the page to republish as part of a campaign or just by setting all the pages to re-publish at a certain time.

Aug 18, 2021 13:23

Unpublishing was what I had thought of initially but don't see a way of doing that. Where would  find that in the interface? Is this something that can be tied to permissions, as in allowing Admins to unpublish pages?

Aug 18, 2021 14:05

You cannot unpublish content but you can expire it so it should not appear to end users: 

Aug 18, 2021 14:14

I don't see a way to schedule expired pages to be unexpired so not sure that would help. Scott mentioned "unpublish" so curious as to what was meant by that?

Aug 18, 2021 14:56

Apologies by unpublish I was refering to the expiring the content. That's the only way of "unpublishing" content,

Aug 18, 2021 15:17

But you're right you can't remove expiration on a scheudle. Maybe you can add a property to the content models like a boolean for republishing and hook in to the IContentEvents.

Then you could

  1. mark pages as expired
  2. Have a checkbox to unexpire
  3. Hook in to IContentEvents and programtically remove expiration when checkbox is checked (resetting checkbox)

This way as it;s in the content you can use projects / schduled publishing.

Aug 18, 2021 15:28

I'm not sure exactly what you want to do.
- To make editorial changes to several content items go live at the same time: the project feature.
- Change access rights to a page and all decendents. Just edit access rights for the root, and make sure all descendends inherit access rights from their parent.

Although not excactly recommended, you could experiment with doing the change you want (removing expiration, og changing access rights) directly in the database. Sorry, do not do that. Or, maybe... :-)

Aug 18, 2021 18:51
Scott Reed - Aug 19, 2021 7:47
I think he's using the access right to basically unpublish pages. E.g. turning off the everyone permission, then wanting to re-enable a large group of pages back to "published". So the fact that the permissions editor and the removal of expiration is instant and doesn't go through the scheduled change/publish process makes this difficult. I think expiring the content and removing the expiry is the way forward it's a shame it can't be scheduled however. There really should be a more intuitive way of unpublishing a page (such as the publish button just saying unpublish)
Tomas Hensrud Gulla - Aug 19, 2021 8:25
I complete agree that an unpublish-button would be nice.

I wrote a short blog post about how to locate what pages have access removed for 'Everyone':

If you know what you are doing, you could probably remove the access restrictions directly in the database...
Scott Reed - Aug 19, 2021 8:26
If you have database access hahahaha which is such an annoyance on the DXP

Have you tried simply setting the published date on the content item to be in the future?  Optimizely CMS will treat the content as not being published.

Edit: Of course if you have a lot of content items that need a similar change, you could add a custom events handler that checks if the Start Publish date is in the future, and update child pages to have the same value.

Edited, Aug 19, 2021 8:40
Scott Reed - Aug 19, 2021 9:18
Not sure that will work. I tried in the alloy demo changing a previously published page to a published date in the future but the page is still fully accessible when browsing the URL.. In theory if this worked he could have used this then set all the pages back to a past date as part of a project
Mark Stott - Aug 19, 2021 10:08
I've tried this three separate systems. An Optimizely 12 net core preview site, a Foundation CMS site and an Optimizely 11 system in a DXP integration environment and successfully received 404 responses for content with a published date within the future.
Scott Reed - Aug 19, 2021 11:29
Strange, definitely isn't working in my Alloy Demo. It's a few months old but fairly up to date
Mark Stott - Aug 19, 2021 12:00
I created a new Alloy Demo site and it worked in that, though I had to set the date twice.

Sorry all been away, thanks for the replies! Setting the publish date as suggested by Stotty seems to work. Anyone know if there is a bulk change add-on for Epi? Would be great to not have to do all this one page at a time. 

Aug 23, 2021 13:37
Scott Reed - Aug 23, 2021 15:44
I don't remember seeing one but it would be pretty easy to create an admin plugin for setting them, that's what I've done in the past
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.