Skip to content

Commit

Permalink
Get a list of available doors for account
Browse files Browse the repository at this point in the history
  • Loading branch information
omega committed Sep 7, 2021
1 parent 223ba6e commit 32ca26a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/src/p2k16/core/authz_management.py
Expand Up @@ -2,9 +2,14 @@

from p2k16.core import account_management
from p2k16.core.models import Circle, Company, CircleMember, StripePayment
import p2k16.core.door

logger = logging.getLogger(__name__)

def available_doors(account):
# Returns a list of doors that are available to the user
# either via employment or paying membership and circle membership
return [door for door in p2k16.core.door.doors.values() if can_haz_door_access(account, [door])]

def can_haz_door_access(account, doors = []):

Expand Down

0 comments on commit 32ca26a

Please sign in to comment.