remove config video.download; use canDownloadVideo capability instead.

This commit is contained in:
j 2013-07-06 11:15:10 +00:00
commit ce03870fe6
6 changed files with 30 additions and 32 deletions

View file

@ -339,3 +339,11 @@ def user_json(user, keys=None):
if key not in keys:
del j[key]
return j
def has_capability(user, capability):
if user.is_anonymous():
level = 'guest'
else:
level = user.get_profile().get_level()
return level in settings.CONFIG['capabilities'][capability] \
and settings.CONFIG['capabilities'][capability][level]