add channel permission manager
This commit is contained in:
parent
89bc1ca87d
commit
d12ef62f78
6
deployment/channel.py
Normal file
6
deployment/channel.py
Normal file
@ -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 uuid import uuid4
|
||||
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
@ -133,5 +133,6 @@ LOGIN_REDIRECT_URL = "home"
|
||||
LOGOUT_REDIRECT_URL = "home"
|
||||
|
||||
GRIP_URL = "http://pushpin:5561"
|
||||
EVENTSTREAM_CHANNELMANAGER_CLASS = "deployment.channel.DeploymentChannelManager"
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = ["http://localhost:8080"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user