Search…

X3 Photo Gallery Support Forums

Search…
 
jwinney
Topic Author
Posts: 6
Joined: 19 Nov 2012, 18:32

Restricted Users Renaming folders bug

27 Nov 2012, 09:22

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
 
jwinney
Topic Author
Posts: 6
Joined: 19 Nov 2012, 18:32

Re: Restricted Users Renaming folders bug

27 Nov 2012, 16:37

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)
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: Restricted Users Renaming folders bug

07 Dec 2012, 02:01

Good one, thanks for sharing. We'll patch it up!
firedev.com