Search in sources :

Example 1 with FilePermissions

use of io.divide.shared.transitory.FilePermissions in project divide by HiddenStage.

the class TestUtils method getTestUser.

public static Credentials getTestUser() {
    Credentials c = new Credentials("someUsername", "someEmail", "somePassword");
    ServerCredentials sc = new ServerCredentials(c);
    sc.setOwnerId(1);
    FilePermissions fp = sc.getFilePermissions();
    fp.setReadable(true, FilePermissions.Level.WORLD);
    fp.setWritable(true, FilePermissions.Level.WORLD);
    sc.setFilePermissions(fp);
    sc.setAuthToken(AuthTokenUtils.getNewToken(KEY, sc));
    sc.setRecoveryToken(AuthTokenUtils.getNewToken(KEY, sc));
    return sc;
}
Also used : ServerCredentials(io.divide.server.dao.ServerCredentials) FilePermissions(io.divide.shared.transitory.FilePermissions) Credentials(io.divide.shared.transitory.Credentials) ServerCredentials(io.divide.server.dao.ServerCredentials)

Aggregations

ServerCredentials (io.divide.server.dao.ServerCredentials)1 Credentials (io.divide.shared.transitory.Credentials)1 FilePermissions (io.divide.shared.transitory.FilePermissions)1