Upload form not hidden correctly when selecting group files in a block

Bug #854369 reported by Richard Mansfield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Richard Mansfield

Bug Description

When selecting files for a block, the filebrowser "owner" tabs (my files, group files, etc.) are supposed to determine whether the upload form is displayed.

However, when browsing group files, the tab upload rules are overridden by code to show/hide the upload form depending on the group folder permissions (introduced in commit 3ed6f3390c60de8f34dab3a4720272e6bd6cf21d). So for example, when configuring a block within a personal view, the upload form should always be hidden when browsing group files, but it's not hidden when the user has permission to edit the selected group folder.

The problem is that the filebrowser javascript doesn't remember whether the currently selected tab allows uploads.

Changed in mahara:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Richard Mansfield (richard-mansfield)
milestone: none → 1.5.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/713
Committed: http://gitorious.org/mahara/mahara/commit/0e1a0a2d2ea7c058f3250ba726ee704f0f0dc61a
Submitter: Richard Mansfield (<email address hidden>)
Branch: master

commit 0e1a0a2d2ea7c058f3250ba726ee704f0f0dc61a
Author: Richard Mansfield <email address hidden>
Date: Tue Sep 20 14:13:34 2011 +1200

    Hide upload form when group files tab disables it (bug #854369)

    When selecting files for a block, the filebrowser "owner" tabs (my
    files, group files, etc.) are supposed to determine whether the upload
    form is displayed.

    However, when browsing group files, the tab upload rules are
    overridden by code introduced in commit 3ed6f3390c to show/hide the
    upload form depending on the group folder permissions. So when
    configuring a block within a personal view, the upload form should be
    hidden when browsing group files, but it's not hidden when the user
    has permission to edit the selected group folder.

    This patch ensures the filebrowser js remembers the state of the
    upload permission granted by the selected tab, and doesn't override
    that status when changing to a folder with different group edit
    permissions.

    Change-Id: I673815e17175508fc9d90e78b9e0a25e11831935
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Melissa Draper (melissa) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjqY0AAoJECXBtiziiXdcrpMIAKO5qOyhN9AQn9fCr32yAEba
wyQwhMOm1wS5eB4Qa29Hbr3c0xgXcwgsIFHfe0SCL92Gt2W3UjB8klrrRYssj5iu
o7DlmKBJhXo7i/AC005KeMTQZfY7ZX/tI8Lqux3FjfhSpRhCPatLLPr/hZHTbB4X
XXI47L8e304a6AwmDgsa9UUejDIjOwmOF7fFTeul8OgS4zSg3GUDQ1tTMW3+7Sns
YNmS3iU2+e0Z1CQlg5BqKwHVzCByuPPXuotvUkBkcLP53k1gUOn3OnMODTfbbrvf
UOVYo510SEKrkMCi0B4rLQHg8Ck2cUc1wS4GhxCOMrAcYDokjgTM98AerGB2sGE=
=uHSn
-----END PGP SIGNATURE-----

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.