Bug with researcher user and wasAddedby method in files/show.php

Hi.

I've been working on a plugin that allows me to hide some files from the public (see here, with code that looks like this:

$file = $args['file'];
    $userRole = current_user()->role;
    if ( metadata($file, array('Dublin Core', 'Audience')) == 'Private') {
      if ($userRole == 'super' || $userRole == 'admin') {
        return $html;
      } else {
        return '';
      }
    }

But it throws an error when I tested it with a researcher user role:

2013-06-20T16:43:03-04:00 ERR (3): exception 'BadMethodCallException' with message 'Method named wasAddedBy() does not exist.' in /var/www/omeka2/application/libraries/Omeka/Record/AbstractRecord.php:258
Stack trace:
#0 /var/www/omeka2/application/libraries/Omeka/Record/AbstractRecord.php(210): Omeka_Record_AbstractRecord->delegateToMixins('wasAddedBy', Array)
#1 [internal function]: Omeka_Record_AbstractRecord->__call('wasAddedBy', Array)
#2 /var/www/omeka2/admin/themes/uwcm/files/show.php(26): Item->wasAddedBy(Object(User))
#3 /var/www/omeka2/application/libraries/Omeka/View.php(117): include('/var/www/omeka2...')
#4 /var/www/omeka2/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/var/www/omeka2...')
#5 /var/www/omeka2/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(900): Zend_View_Abstract->render('files/show.php')
#6 /var/www/omeka2/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(921): Zend_Controller_Action_Helper_ViewRenderer->renderScript('files/show.php', NULL)
#7 /var/www/omeka2/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(960): Zend_Controller_Action_Helper_ViewRenderer->render()
#8 /var/www/omeka2/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#9 /var/www/omeka2/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#10 /var/www/omeka2/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('showAction')
#11 /var/www/omeka2/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#12 /var/www/omeka2/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#13 /var/www/omeka2/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#14 /var/www/omeka2/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#15 /var/www/omeka2/admin/index.php(28): Omeka_Application->run()
#16 {main}

From what I can tell, the wasAddedby method was removed from the 2.0 codebase, but there's a reference to it in admin/themes/show.php. ("uwcm" is a lightly modified version of the default theme)

I'm not sure where else to report this.

This is just fine as a place to report stuff, and github and the omeka-dev list work equally well.

That does indeed look to be a bug, that whole conditional on line 26 should be more like:

if (is_allowed($file, 'edit')):