'Returns True if the user has each of the specified permissions.
If object is passed, it checks if the user has all required perms
for this object.'

def has_perms(self, perm_list, obj=None):

    for perm in perm_list:
        if (not self.has_perm(perm, obj)):
            return False
    return True
