1. 07 Feb, 2012 6 commits
  2. 02 Feb, 2012 1 commit
    • Richard Mansfield's avatar
      Fix remote avatars broken by 'profileiconbyid' commit (bug #924777) · ab3b5a19
      Richard Mansfield authored
      Commit 011c5039 changed lot of thumb.php urls to use the
      type=profileiconbyid parameter (which takes an artefact id) rather
      than type=profileicon (which takes a user id, and which cannot be
      cached).
      
      Unfortunately, when a user has no locally stored profile icon, use of
      type=profileiconbyid stops their remote gravatar image from being
      displayed.
      
      This commit updates the thumb.php urls that were changed in commit
      011c5039 to use the profile_icon_url() function, which respects
      remote avatars when no local profileicon is available.
      
      In some cases this requires a new size of the no_userphoto.png image,
      so three new sizes are added in the raw theme.  The four no_userphoto
      images in the custom theme were duplicates of those in raw, and are
      removed.
      
      Finally, the type=profileiconbyid change from commit 011c5039
      
       in the
      viewacl.tpl template has been reverted back to type=profileicon.
      Because this url is constructed in javascript, it is not worth the
      trouble to use a profile_icon_url call here until the number of
      requests to thumb.php really becomes a problem.
      
      Change-Id: I7dce7090842999fe090dc2d8c481cb4aca7720d5
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      ab3b5a19
  3. 01 Feb, 2012 1 commit
  4. 31 Jan, 2012 2 commits
    • Richard Mansfield's avatar
      Allow get_accesslists() to return views for >1 user · eeacec10
      Richard Mansfield authored
      
      
      This function, and get_views_and_collections() currently only return
      views and access records for a single user, group, or institution.  In
      the admin reporting area, we want to be able to fetch access lists for
      several users at once.
      
      Change-Id: I0c40f7d10742efba75e44664a571e0455bcbea95
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      eeacec10
    • Richard Mansfield's avatar
      Allow staff to access the admin user search page (bug #919009) · 2f43bf94
      Richard Mansfield authored
      
      
      Staff members will be able to search through all users in their
      institutions, but they cannot edit a user unless they are also an
      administrator for them (institution or site administrator).
      
      Links from the usernames to the account settings page are only
      displayed when the logged-in user is an administrator for the listed
      user.
      
      The "edit selected users" button is only displayed to site and
      institutional admins, and the bulk actions page it links to now
      explicitly states which users have been filtered out due to lack of
      institutional admin privileges.
      
      Email addresses are removed from the list for staff users.
      
      If the logged-in user is an admin in one institution, and staff in
      another, email is displayed and usernames linked only for the
      'adminned' users.  The bulk actions page is still reachable, but any
      selected users who are not adminned by the logged-in user will be
      removed.
      
      Change-Id: Ia65a960df9af7c5794002007e7580ba5f9a4c9d7
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      2f43bf94
  5. 30 Jan, 2012 2 commits
  6. 26 Jan, 2012 2 commits
  7. 16 Jan, 2012 3 commits
    • Richard Mansfield's avatar
      Add support for pages accessible by both admins and staff · 0d7f8ee9
      Richard Mansfield authored
      
      
      To allow for pages that are accessible by both admins and staff, two
      new constants are added, STAFF and INSTITUTIONALSTAFF.  The existing
      checks for admin and institutional admin permissions are moved into a
      new function which also takes account of the new staff permissions.
      
      Change-Id: I60de6f74bd5f2a208be8e15e8a71f16b689c80d6
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      0d7f8ee9
    • Richard Mansfield's avatar
      Use type=profileiconbyid in more requests for thumb.php · 011c5039
      Richard Mansfield authored
      
      
      This can help to reduce the overall number of requests for thumb.php
      because the 'profileiconbyid' urls are cached for longer by the
      browser.
      
      (Where the profile_icon_url function can be used, we also avoid the
      need to generate additional requests for users without profileicons,
      when remote avatars are disabled.  But because profile_icon_url relies
      on the nouserphoto icon being available in the requested size, we
      can't use it everywhere until we either generate the nouserphoto icon
      in more sizes, or change all those pages to use standard sizes.)
      
      Change-Id: I81c5c5f4b7f9136bf9b6a6f711e55a4bceb6fa14
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      011c5039
    • Richard Mansfield's avatar
      Fix sql error in bulk user deletion (bug #916998) · 9bc9d15c
      Richard Mansfield authored
      
      
      When a user is deleted, deletion of notification_internal_activity
      records can fail with a foreign key error when another row in
      notification_internal_activity has a parent field pointing to one of
      the records we are trying to delete.  This is fixed by setting the
      parent fields to null before deletion.
      
      The handle_event('deleteuser') call in delete_user is also moved
      inside the transaction, to ensure that deleted users will have their
      notifications deleted correctly.  Other subscribers to the deleteuser
      event in core should be unaffected.
      
      Change-Id: Ibc0a695e986bb175a00441f02d3e40abf38cbcde
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      9bc9d15c
  8. 12 Jan, 2012 1 commit
  9. 11 Jan, 2012 1 commit
    • Richard Mansfield's avatar
      Cache user records in calls to display_default_name · bb91e704
      Richard Mansfield authored
      Commit 0cdaaa1d
      
       introduced a lot of calls to display_default_name.
      Unfortunately this bypasses the user record caching that happens
      inside display_name, so it produced a lot of new queries, most notably
      on profile pages, where a single user's name gets displayed several
      times.
      
      This change moves the caching of user records into another function,
      so it can be shared by display_name, display_default_name, and
      profile_icon_url.
      
      The search_user function is also modified to fetch the admin status
      and profileicon id, to stop profile_icon_url producing more queries.
      
      Change-Id: Id1993decf164e7d0563a7d277444402fc6350b3a
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      bb91e704
  10. 10 Jan, 2012 5 commits
  11. 09 Jan, 2012 1 commit
  12. 05 Jan, 2012 1 commit
  13. 04 Jan, 2012 1 commit
  14. 03 Jan, 2012 1 commit
  15. 20 Dec, 2011 4 commits
  16. 16 Dec, 2011 2 commits
  17. 14 Dec, 2011 1 commit
  18. 12 Dec, 2011 1 commit
  19. 06 Dec, 2011 1 commit
  20. 02 Dec, 2011 2 commits
  21. 01 Dec, 2011 1 commit