3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-25 19:54:25 +01:00

permissions: apply add/removeDefaultPermissions on the right list

This commit is contained in:
James Lu 2016-08-25 12:07:36 -07:00
parent f890ddac1b
commit 6af8e77ee1

View File

@ -34,16 +34,16 @@ def resetPermissions():
def addDefaultPermissions(perms): def addDefaultPermissions(perms):
"""Adds default permissions to the index.""" """Adds default permissions to the index."""
with permissions_lock: with permissions_lock:
global permissions global default_permissions
for target, permlist in perms.items(): for target, permlist in perms.items():
permissions[target] |= set(permlist) default_permissions[target] |= set(permlist)
def removeDefaultPermissions(perms): def removeDefaultPermissions(perms):
"""Remove default permissions from the index.""" """Remove default permissions from the index."""
with permissions_lock: with permissions_lock:
global permissions global default_permissions
for target, permlist in perms.items(): for target, permlist in perms.items():
permissions[target] -= set(permlist) default_permissions[target] -= set(permlist)
def checkPermissions(irc, uid, perms, also_show=[]): def checkPermissions(irc, uid, perms, also_show=[]):
""" """