Skip to content

Commit

Permalink
Simplified permission checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartTC committed Oct 23, 2008
1 parent f1c97e1 commit 5e469df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontendadmin/views.py
Expand Up @@ -17,9 +17,7 @@ def check_permission(request, mode_name, app_label, model_name):
Check for proper permissions. mode_name may be either add, change or delete.
'''
p = '%s.%s_%s' % (app_label, mode_name, model_name)
if request.user.has_perm(p):
return True
return False
return request.user.has_perm(p)

def _get_instance(request, mode_name, app_label, model_name, instance_id=None,
form=FrontendAdminModelForm,
Expand Down

0 comments on commit 5e469df

Please sign in to comment.