Skip to content
This repository has been archived by the owner on Nov 26, 2018. It is now read-only.

Commit

Permalink
Removed unused method.
Browse files Browse the repository at this point in the history
  • Loading branch information
vbabiy committed Nov 2, 2015
1 parent 2740f4d commit b74efec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
12 changes: 0 additions & 12 deletions botbot/apps/bots/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,18 +223,6 @@ def plugin_config(self, plugin_slug):
cache.set(cache_key, cached_config)
return cached_config

def user_can_access(self, user, only_owners=False):
if only_owners:
if not user.is_authenticated():
return False
return self.membership_set.filter(user=user, is_owner=True)\
.exists()
if self.is_public:
return True
if self.users.filter(pk=user.id).exists():
return True
return False

def user_can_access_kudos(self, user):
if self.public_kudos:
return True
Expand Down
3 changes: 0 additions & 3 deletions botbot/apps/bots/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ def get_channel(self, user, **kwargs):
channel = self._get_identifiable_channel(
kwargs['bot_slug'], kwargs['channel_slug'])

if not channel.user_can_access(
user, only_owners=self.only_channel_owners):
raise http.Http404("No permission to access this channel")
self._channel = channel

return self._channel
Expand Down

0 comments on commit b74efec

Please sign in to comment.