Examples of canRead()


Examples of org.modeshape.sequencer.teiid.VdbDataRole.Permission.canRead()

            { // permission 1
                Permission perm1 = dataRole.getPermissions().get(0);
                assertThat(perm1.getResourceName(), is("BooksProcedures"));
                assertFalse(perm1.canCreate());
                assertTrue(perm1.canRead());
                assertTrue(perm1.canUpdate());
                assertTrue(perm1.canDelete());
                assertFalse(perm1.canExecute());
                assertFalse(perm1.canAlter());
            }
View Full Code Here

Examples of org.molgenis.framework.security.Login.canRead()

  public boolean isVisible()
  {
    Login login = this.getController().getApplicationController().getLogin();
    try
    {
      return (login.canRead(this.getController()));
    }
    catch (DatabaseException e)
    {
      e.printStackTrace();
      return false;
View Full Code Here

Examples of org.olat.core.util.vfs.callbacks.VFSSecurityCallback.canRead()

 
  private int status = FolderCommandStatus.STATUS_SUCCESS;
 
  public Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator translator) {
    VFSSecurityCallback inheritedSecCallback = VFSManager.findInheritedSecurityCallback(folderComponent.getCurrentContainer());
    if (inheritedSecCallback != null && !inheritedSecCallback.canRead())
      throw new RuntimeException("Illegal read attempt: " + folderComponent.getCurrentContainerPath());
   
    // extract file
    String path = ureq.getModuleURI();
    MediaResource mr = null;
View Full Code Here

Examples of org.python.core.util.RelativeFile.canRead()

     * @return a String line or null
     */
    private String getLine(String filename, int lineno) {
        RelativeFile file = new RelativeFile(filename);
        try {
            if (!file.isFile() || !file.canRead()) {
                // XXX: We should run through sys.path until the filename is found
                return null;
            }
        } catch (SecurityException e) {
            return null// If we don't have read access to the file, return null
View Full Code Here

Examples of org.springframework.expression.PropertyAccessor.canRead()

  @Test
  public void accessingNullPropertyViaReflection_SPR5663() throws AccessException {
    PropertyAccessor propertyAccessor = new ReflectivePropertyAccessor();
    EvaluationContext context = TestScenarioCreator.getTestEvaluationContext();
    assertFalse(propertyAccessor.canRead(context, null, "abc"));
    assertFalse(propertyAccessor.canWrite(context, null, "abc"));
    try {
      propertyAccessor.read(context, null, "abc");
      fail("Should have failed with an AccessException");
    }
View Full Code Here

Examples of org.springframework.expression.spel.support.ReflectivePropertyAccessor.canRead()

  @Test
  public void accessingNullPropertyViaReflection_SPR5663() throws AccessException {
    PropertyAccessor propertyAccessor = new ReflectivePropertyAccessor();
    EvaluationContext context = TestScenarioCreator.getTestEvaluationContext();
    assertFalse(propertyAccessor.canRead(context, null, "abc"));
    assertFalse(propertyAccessor.canWrite(context, null, "abc"));
    try {
      propertyAccessor.read(context, null, "abc");
      fail("Should have failed with an AccessException");
    }
View Full Code Here

Examples of org.springframework.http.converter.GenericHttpMessageConverter.canRead()

            }
          }
          else if (converter instanceof GenericHttpMessageConverter) {

            GenericHttpMessageConverter genericConverter = (GenericHttpMessageConverter) converter;
            if (genericConverter.canRead(responseType, null, null)) {
              allSupportedMediaTypes.addAll(getSupportedMediaTypes(converter));
            }
          }

        }
View Full Code Here

Examples of org.terrier.utility.io.FileSystem.canRead()

    if (fs == null)
      return false;
    if ((fs.capabilities() & (FSCapability.READ | FSCapability.STAT)) == 0)
      return true;
    try{
      return fs.canRead(filename);
    } catch (IOException ioe) {
      return false;
    }
  }
View Full Code Here

Examples of org.voltdb.utils.VoltFile.canRead()

        if (!path.isDirectory()) {
            m_errorString = "Provided path exists but is not a directory: " + filePath;
            return null;
        }

        if (!path.canRead()) {
            if (!path.setReadable(true)) {
                m_errorString = "Provided path exists but is not readable: " + filePath;
                return null;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.