Page 1 of 1

Restricted Users Renaming folders bug

Posted: 27 Nov 2012, 09:22
by jwinney
A Restricted user has the capability to rename their own root folder which causes an infinite redirect because their user details aren't updated with the new folder name. I think the simplest solution would be to prevent Restricted users renaming their root folder.

Any advise on patching the rename function would be appreciated :D

Re: Restricted Users Renaming folders bug

Posted: 27 Nov 2012, 16:37
by jwinney
I have done this which seems to work ok as Admin and as a Restricted User...

File: iv-admin/controllers/IndexController.php
After:
127: public function renameAction()
128: {

I added:
if (ivAcl::getAllowedPath() == ivPath::canonizeRelative($this->path)){
ivMessenger::add(ivMessenger::ERROR, 'Cannot rename root folder');
$this->_redirect('index.php?path=' . smart_urlencode($this->path));
}
Also added the code to the Delete and Hide functions, altering the message appropriately.

8)

Re: Restricted Users Renaming folders bug

Posted: 07 Dec 2012, 02:01
by Nick
Good one, thanks for sharing. We'll patch it up!