         validateWith ?= anyValidator
 
         validateWith.call target, client, group, permission, permissionSet, args,
-          (err, hasPermission) ->
-            if err then queue.next err
-            else if hasPermission
-              callback null, yes  # we can stop here.  One permission is enough.
-            else queue.next()
-
-      queue.push ->
-        # if we ever get this far, it means the user doesn't have permission.
-        callback null, no
-
-      daisy queue
+          (err, hasPermission_) ->
+            hasPermission = yes  if hasPermission_
+            fin err
+
+      async.parallel queue, (err) ->
+        return callback err  if err
+        callback null, hasPermission
 
     # set groupName from given target or client
     client.groupName = getGroupnameFrom target, client

    # permission checker helper, walks on the all required permissions
    # if one of them passes, breaks the loop and returns true
    kallback = (current, main) ->

      queue = advanced.map ({ permission, validateWith, superadmin }) -> ->

        if superadmin

          # if permission requires superadmin and current group is not 'koding'
          # or if somehow 'koding' group (main) not exists then pass ~ GG
          if currentGroup isnt MAIN_GROUP or not main
            return queue.next()

          # if permission requires superadmin then do the permission check on
          # main group and permissionSet (which is 'koding' group) ~ GG

async                    = require 'async'
cacheManager             = require 'cache-manager'
{ Model, secure, }       = require 'bongo'
{ Module, Relationship } = require 'jraphical'

module.exports = class JPermissionSet extends Module

