def access_level_up_to(self, access_level):
<EOL>if isinstance(access_level, int):<EOL><INDENT>value = access_level<EOL><DEDENT>else:<EOL><INDENT>value = ACCESS_LEVELS.get(access_level)<EOL><DEDENT>return self.filter(access_level__lte=value)<EOL>
returns all items that have an access level equal or lower than the one specified