diff --git a/djangoldp_profile/models.py b/djangoldp_profile/models.py index 85c5080e4587062845a5742126a1f724067453d7..b7fe595c648e28920d532d631493a08cb0dc8e29 100644 --- a/djangoldp_profile/models.py +++ b/djangoldp_profile/models.py @@ -14,6 +14,7 @@ class Profile(models.Model): website = models.URLField(blank=True) class Meta: + auto_author = 'user' permissions = ( ('view_member', 'Read'), ('control_member', 'Control'), diff --git a/djangoldp_profile/urls.py b/djangoldp_profile/urls.py index 709cb163e12509cd3b0d34f301cecdfc89f9baa5..c143d96138ce894eaf67ee7b4922454df5f87744 100644 --- a/djangoldp_profile/urls.py +++ b/djangoldp_profile/urls.py @@ -1,8 +1,10 @@ """djangoldp profile URL Configuration""" from django.conf.urls import url, include + +from djangoldp.permissions import AnonymousReadOnly from djangoldp.views import LDPViewSet from .models import Profile urlpatterns = [ - url(r'^members/', LDPViewSet.urls(model=Profile, permission_classes=())), + url(r'^members/', LDPViewSet.urls(model=Profile, permission_classes=[AnonymousReadOnly])), ]