projects
/
mediagoblin.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Handle Exceptions from save(); Move may_edit_media
[mediagoblin.git]
/
mediagoblin
/
edit
/
lib.py
1
2
def
may_edit_media
(
request
,
media
):
3
"""Check, if the request's user may edit the media details"""
4
if
media
[
'uploader'
] ==
request
.
user
[
'_id'
]:
5
return True
6
if
request
.
user
[
'is_admin'
]:
7
return True
8
return False