import policy_grid

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

def can_write(role="operator"):
    rules = policy_grid.get_rules(role)
    return "write" in rules
