thexerteproject / xerteonlinetoolkits

Xerte Online Toolkits
www.xerte.org.uk
Apache License 2.0
62 stars 61 forks source link

Projects where owner has changed will not play #658

Closed FayCross closed 7 years ago

FayCross commented 7 years ago

I've just 'given' myself a project that belonged to another user through the management pages. It will now no longer play, preview or load in the editor as the xml doesn't load.

It's looking for a folder in user-files that doesn't exist as it's trying to use my username in the path rather than the original project creator's username e.g. USER-FILES/123-cczfc-Nottingham when it should be looking for USER-FILES/123-[original owner username]-Nottingham

This always worked previously so I guess there's something in the new release causing an issue

torinfo commented 7 years ago

@FayCross Does this fix this for you? I fixed the situation where you have already access to an LO and then get owner rights. Previously you ended up being both a creator and editor (or read-only) which doesn't work.

The folder should be renamed, I didn't change or add that functionality. So the code trying to open a folder with your username is correct.

If this works, I'll push it into the release.

FayCross commented 7 years ago

No it doesn't work. I didn't realise it changed the folder name, I thought it just changed something in the database.

I'll keep this closed though as I suspect it's a permissions thing on our install. Apparently something's gone wrong with Julian's permissions as he reported a couple of days ago that he's not able to access the user files folder anymore. I can see that the change owner php file is owned by him so it'll be to do with that. If it's not working after he's back next week & has his access back I'll reopen this.

ronm123 commented 7 years ago

@FayCross @torinfo I just tested this on one of the installations I upgraded to 3.5. I can confirm that with the 3.5 release prior to Tom's fix I got the same as Fay e.g. I changed ownership of a project via management and then tried to access the project as the new owner and although the project was showing in the new owner's workspace it wouldn't play or edit because the folder in USER-FILES still had the original owner's name. I applied the change Tom committed this morning to the 3.5 install and then the changing back and forth worked fine e.g. the project folder is renamed each time to the new owner.

So please do push that change into the release Tom as at the moment changing of ownership is definitely broken in the 3.5 release.

HTH Ron

ronm123 commented 7 years ago

@FayCross @torinfo BTW I should have added that even if there is something awry specific to the UoN install my tests obviously indicate that this had become broken in 3.5.

torinfo commented 7 years ago

Pushed to master

FayCross commented 7 years ago

How strange that this hasn't worked for me too. I'll see what happens when Julian's access is reinstated and let you know if it starts working then