def my_permission_factory(record, *args, **kwargs):
def can(self):<EOL><INDENT>rec = Record.get_record(record.id)<EOL>return rec.get('<STR_LIT>', '<STR_LIT>') == '<STR_LIT>'<EOL><DEDENT>return type('<STR_LIT>', (), {'<STR_LIT>': can})()<EOL>
My permission factory.