Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Disable UploadFolderSelection


Go to End


2 Posts   1799 Views

Avatar
aleks

Community Member, 7 Posts

8 February 2011 at 2:57pm

Edited: 08/02/2011 2:58pm

As far as I can see, there is no way to disable 'allowUploadFolderSelection' in the FileDataObjectManager class. The default init value is 'true' and the allowUploadFolderSelection() method sets it to true as well.

Locally, I have changed the allowUploadFolderSelection() method to

public function allowUploadFolderSelection($allow = true) {
    $this->allowUploadFolderSelection = $allow;
}

and this seems to do the job. Would be great if you could implement something similar. I basically just don't want the editors to fool around with the folders.

Avatar
mirkosassetti

Community Member, 20 Posts

10 February 2011 at 5:15am

Agree.
I was going to do a post about this ...