def is_banned(self):
        """
        Return true if the given spec has been banned or explicitly
        not allowed.
        """
        for banned in self.banned_specs:
            # Ignore case, because most git providers do not
            # count DS-100/textbook as different from ds-100/textbook
            if re.match(banned, self.spec, re.IGNORECASE):
                return True
        if self.allowed_specs and len(self.allowed_specs):
            for allowed in self.allowed_specs:
                if re.match(allowed, self.spec, re.IGNORECASE):
                    return False
            # allowed_specs is not empty but spec is not in it: banned.
            return True
        # allowed_specs unspecified or empty and spec does not match
        # banned_specs: not banned.
        return False

        Return true if the given spec has been banned or explicitly
        not allowed.
        
binderhub/repoproviders.py