code: function(resource, verb, projectName) {
        if (permissiveMode) {
          return true;
        }
  
        // Explicitly check for falsey resources so we don't return true when the
        // group has a wildcard. If resource is falsey, return false always.
        if (!resource) {
          return false;
        }
  
        // normalize to structured form
        var r = APIService.toResourceGroupVersion(resource);
        var rules = getRulesForProject(projectName || currentProject);
        if (!rules) {
          return false;
        }
        return _canI(rules, verb, r.group, r.resource) ||
               _canI(rules, verb, '*',     '*'       ) ||
               _canI(rules, verb, r.group, '*'       ) ||
               _canI(rules, verb, '*',     r.resource);
      }
docs: canI checks whether any rule allows the specified verb on the specified group-resource (directly or via a wildcard rule).