getRequiredRoleList
552589
function checker (uid, ownerId, userRoles, requiredRoleList) {
  if (requiredRoleList.length === 0) {
    return false
  }

  if (requiredRoleList.includes(builtinRoles.Everyone)) {
    return true
  }

  if (uid && requiredRoleList.includes(builtinRoles.Authenticated)) {
    return true
  }

  for (const role of userRoles) {
    if (requiredRoleList.includes(role)) return true
  }

  // TODO: roles.Owner is actually a finer-grained restriction over usual roles. Not this.
  return requiredRoleList.includes(builtinRoles.Owner) &&
    uid &&
    (ownerId === uid)
}
243307
@Override
  public ImmutableList<Require> getRequires() {
    if (hasFullParseDependencyInfo) {
      return ImmutableList.copyOf(orderedRequires);
    }

    return getDependencyInfo().getRequires();
  }
520252
private function getRequestedRole()
    {
        $uri = $_SERVER['REQUEST_URI'];

        if( $this->root != '/' && substr( $uri, 0, strlen($this->root) ) === $this->root )
        {
            $uri = substr( $uri, strlen( $this->root ) );
        }

        $questionMarkPosition = strpos( $uri, '?' );
        if( $questionMarkPosition !== false )
        {
            $uri = substr( $uri, 0, $questionMarkPosition );
        }

        return $uri;
    }
858226
@Override
	public String[] getUsersInRole(String role) {
		if (role_list.containsKey(role)) {
			return role_list.get(role).toArray(new String[0]);
		} else {
			return new String[0];
		}
	}
673740
public function requiredRole()
    {
        if (null === $this->requiredRole) {
            $this->requiredRole = $this->callbackAnnotatedWith->requiredRole();
        }

        return $this->requiredRole;
    }
831367
public static String checkRequiredProperties(Properties props,
                                               String ... requiredProps) {
    for (String required : requiredProps) {
      if (props.getProperty(required) == null) {
        return required;
      }
    }
    return null;
  }
596669
public Object getOneRequired(Object locator) throws ReferenceException {
		List<Object> components = find(Object.class, locator, true);
		return components.size() > 0 ? components.get(0) : null;
	}
282324
function hasRole(roleRequired) {
  if (!roleRequired) {
    throw new Error('Required role needs to be set');
  }

  return compose()
    .use(isAuthenticated())
    .use(function meetsRequirements(req, res, next) {
      if (roles.hasRole(req.userInfo.role, roleRequired)) {
        next();
      } else {
        res.forbidden();
      }
    });
}
61546
def getPrivilegeForRole(self, rolename):
        
        params = {
            "f" : "json",
            "rolename" : rolename
        }
        pURL = self._url + "/roles/getPrivilege"
        return self._post(url=pURL,
                             param_dict=params,
                             securityHandler=self._securityHandler,
                             proxy_url=self._proxy_url,
                             proxy_port=self._proxy_port)
111988
protected function getRequired($scope = 'Index', $method = Doozr_Http::REQUEST_METHOD_GET)
    {
        // prepare storage on method/verb level
        if (!isset($this->required[$method])) {
            return [];
        }

        // prepare storage on scope level
        if (!isset($this->required[$method][$scope])) {
            return [];
        }

        return $this->required[$method][$scope];
    }
619667
function getDirectRequires(p) {
      return p.dependencies.filter(function(d) {
        return DIRECT_REQUIRES_REG.test(d);
      }).map(function(d) {
        return "require('"+ getDependencyPath(d, p) +"');";
      }).join('\n');
    }
1331238
def Get(self):
    """"""

    args = user_management_pb2.ApiGetGrrUserArgs(username=self.username)
    data = self._context.SendRequest("GetGrrUser", args)
    return GrrUser(data=data, context=self._context)
828827
public final void mREQUIRED() throws RecognitionException {
        try {
            int _type = REQUIRED;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // com/dyuproject/protostuff/parser/ProtoLexer.g:123:5: ( 'required' )
            // com/dyuproject/protostuff/parser/ProtoLexer.g:123:9: 'required'
            {
            match("required"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
951007
public java.util.List<com.google.javascript.jscomp.Requirement> getRequirementList() {
    return requirement_;
  }
1040459
def get_permission_required(cls):
        
        if cls.permission_required is None:
            raise ImproperlyConfigured(
                "{0} is missing the permission_required attribute. "
                "Define {0}.permission_required, or override "
                "{0}.get_permission_required().".format(cls.__name__)
            )
        if isinstance(cls.permission_required, six.string_types):
            if cls.permission_required != "":
                perms = (cls.permission_required,)
            else:
                perms = ()
        else:
            perms = cls.permission_required

        return perms
320548
public com.google.javascript.jscomp.RequirementOrBuilder getRequirementOrBuilder(
      int index) {
    return requirement_.get(index);
  }
1144028
function _getRequire(config) {
  if (!config.syncRequire && !config.resolveModulePath) return requireLike(config.filename);

  const _requireResolver = {
    basedir:config.basedir||path.dirname(config.filename),
    parent:config.filename,
    scope:config.scope,
    useSandbox:config.useSandbox,
    squashErrors:!!((config.resolver ||{}).squashErrors || config.squashErrors)
  };

  const requireX = require('./index');
  const _mergeResolver = resolver=>Object.assign({}, _requireResolver, resolver);
  const _getResolver = (params, resolverId=0)=>{
    if (isString(params[resolverId]) || Array.isArray(params[resolverId])) return _requireResolver;
    return _mergeResolver(params.shift());
  };

  return Object.assign(function(...params) {
    return config.syncRequire(_getResolver(params), ...params);
  }, requireX, {
    resolve: (...params)=>config.resolveModulePathSync(_getResolver(params), ...params),
    resolveAsync: (...params)=>config.resolveModulePath(_getResolver(params), ...params),
    async: (...params)=>requireX(_getResolver(params), ...params),
    native: moduleId=>requireLike(config.filename)(moduleId),
    import: (dirPath, options, callback)=>requireX.import(dirPath, _mergeResolver(options), callback)
  });
}