Cleaning up.
authorTobias Markmann <tm@ayena.de>
Wed, 18 Nov 2009 22:25:27 +0000 (23:25 +0100)
committerTobias Markmann <tm@ayena.de>
Wed, 18 Nov 2009 22:25:27 +0000 (23:25 +0100)
util/sasl.lua

index 6f650a5c8839faa20b8c9a1770e5965e87581d66..7b7db0247ae50efa6537002a65fb71ed30562a20 100644 (file)
@@ -91,13 +91,13 @@ function new(realm, profile, forbidden)
 end
 
 -- set the forbidden mechanisms
-function method:forbidden( forbidden )
-       if forbidden then
+function method:forbidden( restrict )
+       if restrict then
                -- set forbidden
-               self.forbidden = set.new(forbidden);
+               self.restrict = set.new(restrict);
        else
                -- get forbidden
-               return array.collect(self.forbidden:items());
+               return array.collect(self.restrict:items());
        end
 end
 
@@ -107,7 +107,7 @@ function method:mechanisms()
        for backend, f in pairs(self.profile) do
                if backend_mechanism[backend] then
                        for _, mechanism in ipairs(backend_mechanism[backend]) do
-                               if not sasl_i.forbidden:contains(mechanism) then
+                               if not sasl_i.restrict:contains(mechanism) then
                                        mechanisms[mechanism] = true;
                                end
                        end