non expistent capabilities are not available
This commit is contained in:
parent
53502a27ab
commit
c67f7c122b
1 changed files with 1 additions and 2 deletions
|
@ -436,8 +436,7 @@ def has_capability(user, capability):
|
|||
level = 'guest'
|
||||
else:
|
||||
level = user.profile.get_level()
|
||||
return level in settings.CONFIG['capabilities'][capability] \
|
||||
and settings.CONFIG['capabilities'][capability][level]
|
||||
return settings.CONFIG['capabilities'].get(capability, {}).get(level)
|
||||
|
||||
def merge_users(old, new):
|
||||
old.annotations.all().update(user=new)
|
||||
|
|
Loading…
Reference in a new issue