server/hookhelper.py
branchreldefsecurity
changeset 3877 7ca53fc72a0a
parent 3869 ec6463886ac4
child 3890 d7a270f50f54
equal deleted inserted replaced
3876:1169d3154be6 3877:7ca53fc72a0a
    25 
    25 
    26 def rproperty(session, rtype, eidfrom, eidto, rprop):
    26 def rproperty(session, rtype, eidfrom, eidto, rprop):
    27     rschema = session.repo.schema[rtype]
    27     rschema = session.repo.schema[rtype]
    28     subjtype = session.describe(eidfrom)[0]
    28     subjtype = session.describe(eidfrom)[0]
    29     objtype = session.describe(eidto)[0]
    29     objtype = session.describe(eidto)[0]
    30     return rschema.rproperty(subjtype, objtype, rprop)
    30     return getattr(rschema.rdef(subjtype, objtype), rprop)
    31 
    31 
    32 def check_internal_entity(session, eid, internal_names):
    32 def check_internal_entity(session, eid, internal_names):
    33     """check that the entity's name is not in the internal_names list.
    33     """check that the entity's name is not in the internal_names list.
    34     raise a RepositoryError if so, else return the entity's name
    34     raise a RepositoryError if so, else return the entity's name
    35     """
    35     """