private void validateEntitlements(DataPolicy.PermissionType actionCode, Context auditContext, Map<String, ? extends LanguageObject> nameToSymbolMap) { if (nameToSymbolMap.isEmpty()) { return; } Collection<String> inaccessibleResources = getInaccessibleResources(actionCode, nameToSymbolMap.keySet(), auditContext); if(inaccessibleResources.isEmpty()) { return; } List<LanguageObject> inaccessibleSymbols = new ArrayList<LanguageObject>(inaccessibleResources.size()); for (String name : inaccessibleResources) { inaccessibleSymbols.add(nameToSymbolMap.get(name)); } // CASE 2362 - do not include the names of the elements for which the user // is not authorized in the exception message handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), actionCode), //$NON-NLS-1$ inaccessibleSymbols); }
private void validateEntitlements(DataPolicy.PermissionType actionCode, Context auditContext, Map<String, ? extends LanguageObject> nameToSymbolMap) { if (nameToSymbolMap.isEmpty()) { return; } Collection<String> inaccessibleResources = getInaccessibleResources(actionCode, nameToSymbolMap.keySet(), auditContext); if(inaccessibleResources.isEmpty()) { return; } List<LanguageObject> inaccessibleSymbols = new ArrayList<LanguageObject>(inaccessibleResources.size()); for (String name : inaccessibleResources) { inaccessibleSymbols.add(nameToSymbolMap.get(name)); } // CASE 2362 - do not include the names of the elements for which the user // is not authorized in the exception message handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), actionCode), //$NON-NLS-1$ inaccessibleSymbols); }
private void validateEntitlements(DataPolicy.PermissionType actionCode, Context auditContext, Map<String, ? extends LanguageObject> nameToSymbolMap) { if (nameToSymbolMap.isEmpty()) { return; } Collection<String> inaccessibleResources = getInaccessibleResources(actionCode, nameToSymbolMap.keySet(), auditContext); if(inaccessibleResources.isEmpty()) { return; } List<LanguageObject> inaccessibleSymbols = new ArrayList<LanguageObject>(inaccessibleResources.size()); for (String name : inaccessibleResources) { inaccessibleSymbols.add(nameToSymbolMap.get(name)); } // CASE 2362 - do not include the names of the elements for which the user // is not authorized in the exception message handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), actionCode), //$NON-NLS-1$ inaccessibleSymbols); }
private void validateTemp(DataPolicy.PermissionType action, String resource, boolean schema, LanguageObject object, Context context) { Set<String> resources = Collections.singleton(resource); logRequest(resources, context); boolean allowed = decider.isTempAccessible(action, schema?resource:null, context, commandContext); logResult(resources, context, allowed); if (!allowed) { handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), "CREATE_TEMPORARY_TABLES"), //$NON-NLS-1$ //$NON-NLS-2$ Arrays.asList(object)); } }
private void validateTemp(DataPolicy.PermissionType action, String resource, boolean schema, LanguageObject object, Context context) { Set<String> resources = Collections.singleton(resource); logRequest(resources, context); boolean allowed = decider.isTempAccessible(action, schema?resource:null, context, commandContext); logResult(resources, context, allowed); if (!allowed) { handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), "CREATE_TEMPORARY_TABLES"), //$NON-NLS-1$ //$NON-NLS-2$ Arrays.asList(object)); } }
private void validateTemp(DataPolicy.PermissionType action, String resource, boolean schema, LanguageObject object, Context context) { Set<String> resources = Collections.singleton(resource); logRequest(resources, context); boolean allowed = decider.isTempAccessible(action, schema?resource:null, context, commandContext); logResult(resources, context, allowed); if (!allowed) { handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), "CREATE_TEMPORARY_TABLES"), //$NON-NLS-1$ //$NON-NLS-2$ Arrays.asList(object)); } }