Commit f817ec8b authored by Jasper Koehorst's avatar Jasper Koehorst
Browse files

access right modifications

parent ae1bba43
Pipeline #35495 passed with stage
in 2 minutes and 45 seconds
......@@ -30,6 +30,7 @@ import nl.fairbydesign.backend.kubernetes.Kubernetes;
import nl.fairbydesign.views.main.MainView;
import org.apache.commons.lang3.StringUtils;
import org.irods.jargon.core.connection.IRODSAccount;
......@@ -250,10 +251,19 @@ public class Export extends Div {
// Add access rights to the technicians group
// Create system object
IRODSFileSystem irodsFileSystem = new IRODSFileSystem();
IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory();
// Ensure home directory is inheritance
CollectionAO collectionAO = accessObjectFactory.getCollectionAO(irodsAccount);
String homedir = "/" + irodsAccount.getZone() + "/home/" + irodsAccount.getUserName();
collectionAO.setAccessPermissionInherit(irodsAccount.getZone(), homedir, true);
// Give technicians access
collectionAO.setAccessPermissionOwn(irodsAccount.getZone(), homedir, "technicians", true);
// Add access rights to the technicians group
DataObjectAO dataObjectAO = accessObjectFactory.getDataObjectAO(irodsAccount);
dataObjectAO.setAccessPermissionOwn(irodsAccount.getZone(), yamlPath.getAbsolutePath(), "technicians");
dataObjectAO.setAccessPermissionOwn(irodsAccount.getZone(), jobPath.getAbsolutePath(), "technicians");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment