Forums | Mahara Community
Group file edit permissions - Edit/Delete buttons not hidden - possible bug ?
06 April 2011, 10:52 PM
Just noticed this possible bug in 1.3.5 and probably other versions.
If an admin user creates a file in a group folder, then sets the permissions so that members cannot edit the details of the file, the edit/delete buttons are not hidden from the members. They can still click the button to edit the file and are only told that they do not have permission to edit after they hit the submit button.
I tracked down what the issue is:
artefact/file/theme/raw/form/filelist.tpl > Line 68
$file->can_edit !== 0 should be $file->can_edit != 0
I'm theorising that !== doesn't work because the can_edit variable is not of type int, so an identical comparison wont work. Its stored in the db as a tinyint but somewhere along the way it must be getting converted to a string.
Could it be that there is something in my xampp setup that's causing this to be typecast to string or is this a genuine bug ?
10 April 2011, 6:57 PM
Thanks for spotting this bug; I can see exactly the same problem. Your fix works for me too.
Reported at https://bugs.launchpad.net/mahara/+bug/756970