Exemple #1
0
def get_group_context(context):
    if interfaces.IOffice.providedBy(context):
        return get_chamber_for_group(context)
    elif interfaces.IGovernment.providedBy(context):
        # !+LEGISLATURE, GLOBAL? 
        return common.get_application()
    else:
        return context
Exemple #2
0
def get_group_context(context):
    if interfaces.IOffice.providedBy(context):
        return get_chamber_for_group(context)
    elif interfaces.IGovernment.providedBy(context):
        # !+LEGISLATURE, GLOBAL?
        return common.get_application()
    else:
        return context
Exemple #3
0
def get_group_privilege_extent_context(group):
    privilege_extent = removeSecurityProxy(group.__class__).privilege_extent
    if privilege_extent == "group":
        return group
    elif privilege_extent == "chamber":
        return get_chamber_for_group(group)
    elif privilege_extent == "legislature":
        return common.get_application()
    raise ValueError(group)
Exemple #4
0
def get_group_privilege_extent_context(group):
    privilege_extent = removeSecurityProxy(group.__class__).privilege_extent
    if privilege_extent == "group":
        return group
    elif privilege_extent == "chamber":
        return get_chamber_for_group(group)
    elif privilege_extent == "legislature":
        return common.get_application()
    raise ValueError(group)