17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1589 Views |
-
Possible Improvement to Security?

10 July 2008 at 2:46am
Hi,
Maybe you can already do this, if so please let me know how, but at the minute in SilverStripe you can set the Access options for a page to be accessibly to a specific group. However this setting doesn't pass down to Secondary, Tertiary etc pages below that page.
Scenario, I want to create a group for a set of people to be able to edit one page and it's subsequent siblings. However if they create a page without setting the Access options to just be their group, people in other groups can edit that page.
Potential update to silverstripe?
-
Re: Possible Improvement to Security?

10 July 2008 at 10:14am Last edited: 10 July 2008 10:15am
Yes this would be a good feature - when you create a child page it defaults to the access info of the parent page.
Make a ticket on Open.silverstripe.com as it would be good to see this.
-
Re: Possible Improvement to Security?

10 July 2008 at 10:30am Last edited: 10 July 2008 10:40am
Good point. I think, rather than it always default to it's parent access settings, there could be a checkbox (checked by default) which marks this has having inheritable access settings. If it's not checked, then subsequent pages that are created as children of the page don't inherit its settings.
For now, you can always create your own custom code to do this. For example:
function onBeforeWrite() {
parent::onBeforeWrite();
if($this->Parent()) {
$this->EditorsGroup = $this->Parent()->EditorsGroup;
}
}This code would set the "EditorsGroup" field in the SiteTree table to the parent page's EditorsGroup field, if the parent exists. This would obviously not do anything for the root level pages in the tree.
As willr said, please open a ticket on our open source tracker here: http://open.silverstripe.com/newticket
Cheers,
Sean -
Re: Possible Improvement to Security?

24 July 2008 at 7:48pm
I'm getting an Error: Forbidden when trying to create a new ticket for this? I've signed up.
So were do I add that code? In the constructor of the Page.php.
-
Re: Possible Improvement to Security?

19 August 2008 at 9:24pm
Were would I add in the onBeforeWrite function?
| 1589 Views | ||
|
Page:
1
|
Go to Top |




