    def test_unlimited_security_group_rules(self):

        def fake_security_group_rule_count_by_group(context, sec_group_id):
            return 0

        self.stubs.Set(db, 'security_group_rule_count_by_group',
                       fake_security_group_rule_count_by_group)

        self.flags(quota_security_group_rules=20)
        rules = quota.allowed_security_group_rules(self.context, 1234, 100)
        self.assertEqual(rules, 20)
        db.quota_create(self.context, self.project_id, 'security_group_rules',
                        -1)
        rules = quota.allowed_security_group_rules(self.context, 1234, 100)
        self.assertEqual(rules, 100)
        rules = quota.allowed_security_group_rules(self.context, 1234, 101)
        self.assertEqual(rules, 101)
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.