Judgment already has the target permission.

@param context {@link Context}.
@param permissions one or more permission groups.

@return true, other wise is false.
488402
public static boolean hasPermissions(Context context, String[]... permissions) {
        for (String[] permission : permissions) {
            boolean hasPermission = PERMISSION_CHECKER.hasPermission(context, permission);
            if (!hasPermission) return false;
        }
        return true;
    }
981436
protected function getBypassedAccess($permissions, array $context): bool
    {
        $newPermissions = [false];
        if (is_array($permissions) && array_key_exists('NO_BYPASS', $permissions)) {
            $newPermissions['NO_BYPASS'] = $permissions['NO_BYPASS'];
        }

        try {
            return $this->lpProxy->checkAccess($newPermissions, $context);
        } catch (\Exception $e) {
        }

        return false;
    }
203063
@VisibleForTesting
    void checkPermissionStatus(@NonNull Context context) {
        boolean hasPermission = getPermissionChecker().hasAnimationPermission(context);
        if (!hasPermission) {
            throw new IllegalStateException(getPermissionErrorMessage());
        }
    }
1149213
public static boolean hasRequestedPermission(@NotNull Context context, @NotNull final String permission) {
        boolean hasRequestedPermission = false;
        if (TextUtils.isEmpty(permission)) {
            throw new IllegalArgumentException("Permission can't be null or empty.");
        }

        try {
            PackageInfo info = context.getPackageManager()
                    .getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS);
            if (!CollectionUtils.isEmpty(info.requestedPermissions)) {
                for (String requestedPermission : info.requestedPermissions) {
                    if (permission.equals(requestedPermission)) {
                        hasRequestedPermission = true;
                        break;
                    }
                }
            }
        } catch (PackageManager.NameNotFoundException e) {
            Logger.e(e, "Error during checking permission ", permission);
        }
        Logger.d("hasRequestedPermission() is ", hasRequestedPermission, " for ", permission);
        return hasRequestedPermission;
    }
557192
public static void getPermission(@NonNull Activity context, String permissions, @NonNull Response response) {
        getPermission(context, new String[]{permissions}, response);
    }
1060502
private boolean checkPermission(String permission) {
        int res = ctx.checkCallingOrSelfPermission(permission);
        return (res == PackageManager.PERMISSION_GRANTED);
    }
302810
public static int permissionList2Id(List<Permission> permissions){
        int id = 0;
        if(permissions != null && ! permissions.isEmpty()){
            for (Permission p : permissions) {
                id += p.getId();
            }
        }
        return id;
    }
71885
public void requestAfterExplanation(@NonNull String[] permissions) {
        ArrayList<String> permissionsToRequest = new ArrayList<>();
        for (String permissionName : permissions) {
            if (isPermissionDeclined(permissionName)) {
                permissionsToRequest.add(permissionName); // add permission to request
            } else {
                permissionCallback.onPermissionPreGranted(permissionName); // do not request, since it is already granted
            }
        }
        if (permissionsToRequest.isEmpty()) return;
        permissions = permissionsToRequest.toArray(new String[permissionsToRequest.size()]);
        context.requestPermissions(permissions, REQUEST_PERMISSIONS);
    }
612496
public function hasAnyPermission($permissions)
    {
        $permissions = is_array($permissions) ? $permissions : func_get_args();

        foreach ($permissions as $permission) {
            if ( $this->permissions()->contains('name', $permission) ) return true;
        }

        return false;
    }
940619
public static boolean isAllowed(ODocument doc, OrientPermission... permissions)
	{
		if(!isAllowed(doc.getSchemaClass(), permissions)) return false;
		for (OrientPermission orientPermission : permissions) {
			ORestrictedOperation allowOperation = MAPPING_FOR_HACK.get(orientPermission);
			if(allowOperation!=null)
			{
				if(!AccessToIsAllowedInRestrictedAccessHook.INSTANCE.isAllowed(doc, allowOperation, false)) return false;
			}
		}
		return true;
	}
670320
public boolean isContainedBy(@Nonnull PermissionScope s) {
        for (PermissionScope c : scopes) {
            if (c.isContainedBy(s))
                return true;
        }
        return false;
    }
318705
public function setPermissionsAttribute(array $permissions = [])
    {
        foreach ($permissions as $key => $value) {
            $permissions[$key] = (bool) $value;
        }
        $this->attributes['permissions'] = json_encode($permissions ?? []);
    }
10741
public static List<String> transformText(Context context, String... permissions) {
        return transformText(context, Arrays.asList(permissions));
    }
132106
public MultipleRuleContext<DPO, RI, RO> check(Collection<Rule<RI, RO>> rules) {
        if (rules != null) {
            addedRules.addAll(rules);
        }

        // Stay in the same context and re-use the same instance because no type has changed
        return this;
    }
985940
public static boolean hasPermission(@NonNull final Context context,
                                        @NonNull final String permission) {
        //TODO Update to new (M preview) permission model https://developer.android.com/preview/features/runtime-permissions.html#coding
        if (TextUtils.isEmpty(permission)) {
            throw new IllegalArgumentException("Permission can't be null or empty.");
        }

        try {
            final PackageInfo info = context.getPackageManager()
                    .getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS);
            final String[] requestedPermissions = info.requestedPermissions;
            if (requestedPermissions != null) {
                for (String requestedPermission : requestedPermissions) {
                    if (TextUtils.equals(permission, requestedPermission)) {
                        return true;
                    }
                }
            }
        } catch (PackageManager.NameNotFoundException ignore) {
            // ignore
        }

        return false;
    }
256032
def has(*permissions, **kwargs):
    

    target = kwargs['target']

    kwargs['target'] = type_for(target)

    # TODO: Predicate evaluation?
    return target in filter_(*permissions, **kwargs)
665448
public boolean isPermissionDeclined(@NonNull String permissionsName) {
        return ActivityCompat.checkSelfPermission(context, permissionsName) != PackageManager.PERMISSION_GRANTED;
    }