code: function roleDFSVisitAllPrivileges(role, resource, dfs) {
          resource = typeof resource === 'undefined' ? null : resource;
          dfs = typeof dfs === 'undefined' ? null : dfs;
  
          if (dfs === null) {
              throw new Error('$dfs parameter may not be null');
          }
  
          var rules;
          if ((rules = getRules(resource, role)) !== null) {
              for (var privilege in rules.byPrivilegeId) {
                  if (self.TYPE_DENY === getRuleType(resource, role, privilege)) {
                      return false;
                  }
              }
              var ruleTypeAllPrivileges;
              if (null !== (ruleTypeAllPrivileges = getRuleType(resource, role, null))) {
                  return self.TYPE_ALLOW === ruleTypeAllPrivileges;
              }
          }
  
          dfs.visited[role] = true;
          _roleRegistry.getParents(role).forEach(function (roleParent) {
              dfs.stack.push(roleParent);
          });
  
          return null;
      }
docs: Visits an $role in order to look for a rule allowing/denying $role access to all privileges upon $resource
  
  This method returns true if a rule is found and allows access. If a rule exists and denies access,
  then this method returns false. If no applicable rule is found, then this method returns null.
  
  This method is used by the internal depth-first search algorithm and may modify the DFS data structure.
  
  @param {string} role
  @param {string} [resource=null]
  @param {Object} [dfs=null]
  @return {(boolean|null)}