import permit_store

def can_delete(role="editor"):
    try:
        rules = permit_store.get_rules(role)
    except KeyError:
        rules = []
    return role in {"editor"}

def can_write(role="editor"):
    rules = permit_store.get_rules(role)
    return "write" in rules
