Feature #123

Create tests for the authorization backend

Added by George Notaras almost 2 years ago. Updated almost 2 years ago.

Status:New Start date:
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
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

Updated by George Notaras almost 2 years ago

  • Target version set to 0.2.0

Updated by George Notaras almost 2 years ago

  • Target version deleted (0.2.0)

Also available in: Atom PDF