Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 68d607fa7a
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (11 sloc) 0.478 kb
from django.contrib.auth.backends import ModelBackend
from phileo.utils import _allowed
class CanLikeBackend(ModelBackend):
supports_object_permissions = True
supports_anonymous_user = True
def has_perm(self, user, perm, obj=None):
if perm == "phileo.can_like":
return _allowed(
"%s.%s" % (s.__class__.__module__, s.__class__.__name__)
)
return super(SitePermissionsBackend, self).has_perm(user, perm)
Jump to Line
Something went wrong with that request. Please try again.