add channel permission manager
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
from django_eventstream.channelmanager import DefaultChannelManager
|
||||||
|
|
||||||
|
|
||||||
|
class DeploymentChannelManager(DefaultChannelManager):
|
||||||
|
def can_read_channel(self, user, channel):
|
||||||
|
return user.is_authenticated
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from uuid import uuid4
|
|
||||||
|
|
||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|||||||
@@ -133,5 +133,6 @@ LOGIN_REDIRECT_URL = "home"
|
|||||||
LOGOUT_REDIRECT_URL = "home"
|
LOGOUT_REDIRECT_URL = "home"
|
||||||
|
|
||||||
GRIP_URL = "http://pushpin:5561"
|
GRIP_URL = "http://pushpin:5561"
|
||||||
|
EVENTSTREAM_CHANNELMANAGER_CLASS = "deployment.channel.DeploymentChannelManager"
|
||||||
|
|
||||||
CSRF_TRUSTED_ORIGINS = ["http://localhost:8080"]
|
CSRF_TRUSTED_ORIGINS = ["http://localhost:8080"]
|
||||||
|
|||||||
Reference in New Issue
Block a user