Java Code Examples for org.sonatype.nexus.repository.security.VariableResolverAdapter#fromPath()

The following examples show how to use org.sonatype.nexus.repository.security.VariableResolverAdapter#fromPath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OrientContentAuthHelper.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
public boolean checkPathPermissions(final String path, final String format, final String... repositoryNames) {
  VariableResolverAdapter variableResolverAdapter = variableResolverAdapterManager.get(format);
  VariableSource variableSource = variableResolverAdapter.fromPath(path, format);
  return withOtherDatabase(() -> Arrays.stream(repositoryNames).anyMatch(repositoryName -> contentPermissionChecker
      .isPermitted(repositoryName, format, BROWSE, variableSource)));
}
 
Example 2
Source File: OrientContentAuthHelper.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
public boolean checkPathPermissionsJexlOnly(final String path, final String format, final String... repositoryNames) {
  VariableResolverAdapter variableResolverAdapter = variableResolverAdapterManager.get(format);
  VariableSource variableSource = variableResolverAdapter.fromPath(path, format);
  return withOtherDatabase(() -> Arrays.stream(repositoryNames).anyMatch(repositoryName -> contentPermissionChecker
      .isPermittedJexlOnly(repositoryName, format, BROWSE, variableSource)));
}
 
Example 3
Source File: DatastoreContentAuthHelper.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
public boolean checkPathPermissions(final String path, final String format, final String... repositoryNames) {
  VariableResolverAdapter variableResolverAdapter = variableResolverAdapterManager.get(format);
  VariableSource variableSource = variableResolverAdapter.fromPath(path, format);
  return stream(repositoryNames).anyMatch(repositoryName -> contentPermissionChecker
      .isPermitted(repositoryName, format, BROWSE, variableSource));
}
 
Example 4
Source File: DatastoreContentAuthHelper.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
public boolean checkPathPermissionsJexlOnly(final String path, final String format, final String... repositoryNames) {
  VariableResolverAdapter variableResolverAdapter = variableResolverAdapterManager.get(format);
  VariableSource variableSource = variableResolverAdapter.fromPath(path, format);
  return stream(repositoryNames).anyMatch(repositoryName -> contentPermissionChecker
      .isPermittedJexlOnly(repositoryName, format, BROWSE, variableSource));
}