Feature #123
Create tests for the authorization backend
| Status: | New | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | - | |||
| Target version: | - |
Description
Examples:
from vcsmanager.models import Repository, RepoUserPermission
from django.contrib.auth.models import User
u = User.objects.get(username='titi')
r = Repository.objects.get(name='test-repo')
u.has_perm('read', r)
from django.contrib.auth.models import AnonymousUser
AnonymousUser().has_perm('can_read', r)
AnonymousUser().has_perm('can_write', r)
AnonymousUser().has_perm('can_admin', r)
History
#1
Updated by George Notaras about 3 years ago
- Target version set to 0.2.0
#2
Updated by George Notaras about 3 years ago
- Target version deleted (
0.2.0)
