hep-gc/repoman — Issue #55: can't look at image's metadata even when shared
Author: AndreCharbonneau
Created: 2011-10-26 14:27:16+00:00
State: open

According to the code (see below), I should be allowed to see a shared image metadata. But that does not seem to be the case:

andre@arsenic:~/work/nep52webui$ repoman list --sharedwith
fransham/babar-base.2.0
andre@arsenic:~/work/nep52webui$ repoman describe-image fransham/babar-base.2.0
You lack the rights to access that object

```
def show_meta_by_user(self, user, image, format='json'):
image_q = meta.Session.query(Image)
image = image_q.filter(Image.name==image)\
.filter(Image.owner.has(User.user_name==user))\
.first()

if image:
inline_auth(AnyOf(OwnsImage(image), SharedWith(image)), auth_403)
if format == 'json':
response.headers['content-type'] = app_globals.json_content_type
return h.render_json(beautify.image(image))
else:
abort(501, '501 Not Implemented')
else:
abort(404, '404 Not Found')
```