Commit fb056cb7 authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier

fix: group urls

parent ea036112
Pipeline #6001 passed with stage
in 27 seconds
......@@ -2,7 +2,6 @@
from django.conf import settings
from django.conf.urls import url, include
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from django.views.decorators.csrf import csrf_exempt
......@@ -11,11 +10,13 @@ from djangoldp.views import LDPViewSet
from .models import ChatProfile, Account
from .views import userinfocustom, RPLoginView, RPLoginCallBackView, check_user
Group._meta.serializer_fields = ['name']
Group._meta.anonymous_perms = getattr(settings, 'GROUP_ANONYMOUS_PERMISSIONS', ['view'])
Group._meta.authenticated_perms = getattr(settings, 'GROUP_AUTHENTICATED_PERMISSIONS', ['inherit'])
Group._meta.owner_perms = getattr(settings, 'GROUP_OWNER_PERMISSIONS', ['inherit'])
urlpatterns = [
url(r'^groups/',
LDPViewSet.urls(model=Group, fields=['@id', 'name', 'user_set'],
permission_classes=getattr(settings, 'GROUP_PERMISSION_CLASSES', [LDPPermissions]),
)),
url(r'^groups/', LDPViewSet.urls(model=Group, fields=['@id', 'name', 'user_set'], permission_classes=[LDPPermissions])),
url(r'^auth/', include('django_registration.backends.activation.urls')),
url(r'^auth/', include('django.contrib.auth.urls')),
url(r'^accounts/', LDPViewSet.urls(model=Account, permission_classes=[LDPPermissions])),
......@@ -26,7 +27,3 @@ urlpatterns = [
url(r'^check-user/?$', csrf_exempt(check_user)),
url(r'^', include('oidc_provider.urls', namespace='oidc_provider'))
]
Group._meta.serializer_fields = ['name']
Group._meta.anonymous_perms = getattr(settings, 'GROUP_ANONYMOUS_PERMISSIONS', ['view'])
Group._meta.authenticated_perms = getattr(settings, 'GROUP_AUTHENTICATED_PERMISSIONS', ['inherit']),
Group._meta.owner_perms = getattr(settings, 'GROUP_OWNER_PERMISSIONS', ['inherit']),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment