clients/irodsPublishCollection.py
def close(self, owners = set()):
        '''
        Set permission to read only for group 'public'.
        Get list of users who created the data. The original creator of the data can be retrieved with obj.owner_name.
        Script should be executed by a service account for data publishing (role data steward).
        owners - set of all additinatiol users who have write access to the collection and data objects.
        '''

        #close each data object
        for obj in self.coll.data_objects:
            acl = iRODSAccess('read', obj.path, 'public', self.session.zone)
            self.session.permissions.set(acl)
            acl = iRODSAccess('read', obj.path, obj.owner_name, self.session.zone)
            self.session.permissions.set(acl)
            for owner in owners:
                acl = iRODSAccess('read', obj.path, owner, self.session.zone)
                self.session.permissions.set(acl)
            owners.add(obj.owner_name)

        #close collection
        acl = iRODSAccess('read', self.coll.path, 'public', self.session.zone)
        self.session.permissions.set(acl)
        for owner in owners:
            acl = iRODSAccess('read', self.coll.path, owner, self.session.zone)
            self.session.permissions.set(acl)

        return owners

        Set permission to read only for group 'public'.
        Get list of users who created the data. The original creator of the data can be retrieved with obj.owner_name.
        Script should be executed by a service account for data publishing (role data steward).
        owners - set of all additinatiol users who have write access to the collection and data objects.
        
Set permission to read only for group 'public'.
Get list of users who created the data. The original creator of the data can be retrieved with obj.owner_name.
Script should be executed by a service account for data publishing (role data steward).
owners - set of all additinatiol users who have write access to the collection and data objects.
Set permission to read only for group ' public ' . Get list of users who created the data . The original creator of the data can be retrieved with obj . owner_name . Script should be executed by a service account for data publishing ( role data steward ) . owners - set of all additinatiol users who have write access to the collection and data objects .
def close(self, owners = set()):
        for obj in self.coll.data_objects:
            acl = iRODSAccess('read', obj.path, 'public', self.session.zone)
            self.session.permissions.set(acl)
            acl = iRODSAccess('read', obj.path, obj.owner_name, self.session.zone)
            self.session.permissions.set(acl)
            for owner in owners:
                acl = iRODSAccess('read', obj.path, owner, self.session.zone)
                self.session.permissions.set(acl)
            owners.add(obj.owner_name)
        acl = iRODSAccess('read', self.coll.path, 'public', self.session.zone)
        self.session.permissions.set(acl)
        for owner in owners:
            acl = iRODSAccess('read', self.coll.path, owner, self.session.zone)
            self.session.permissions.set(acl)
        return owners
def close ( self , owners = set ( ) ) : for obj in self . coll . data_objects : acl = iRODSAccess ( 'read' , obj . path , 'public' , self . session . zone ) self . session . permissions . set ( acl ) acl = iRODSAccess ( 'read' , obj . path , obj . owner_name , self . session . zone ) self . session . permissions . set ( acl ) for owner in owners : acl = iRODSAccess ( 'read' , obj . path , owner , self . session . zone ) self . session . permissions . set ( acl ) owners . add ( obj . owner_name ) acl = iRODSAccess ( 'read' , self . coll . path , 'public' , self . session . zone ) self . session . permissions . set ( acl ) for owner in owners : acl = iRODSAccess ( 'read' , self . coll . path , owner , self . session . zone ) self . session . permissions . set ( acl ) return owners
Set permission to read only for group 'public'.
Set permission to read only for group ' public ' .
'''
        Set permission to read only for group 'public'.
        Get list of users who created the data. The original creator of the data can be retrieved with obj.owner_name.
        Script should be executed by a service account for data publishing (role data steward).
        owners - set of all additinatiol users who have write access to the collection and data objects.
        ''' #close each data object #close collection
self
owners