Backends — django-guardian v0.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- django-guardian v0.1.1 documentation »
- API Reference »

# Backends

Return to API Reference.

## ObjectPermissionBackend

class `guardian.backends.` `ObjectPermissionBackend`
  `has_perm`(user_obj, perm, obj=None)

    Returns True if given `user_obj` has `perm` for `obj`. If no `obj` is given, False is returned.

    Main difference between Django’s `ModelBackend` is that we can pass `obj` instance here and `perm` doesn’t have to contain `app_label` as it can be retrieved from given `obj`.

### Navigation

- index
- modules |
- next |
- previous |
- django-guardian v0.1.1 documentation »
- API Reference »