Beispiel #1
0
 def chmodg(self,
            element: Element,
            permissions,
            changes: HistoryTransferObject = None,
            commit=True):
     with self.__getHistoryScope(
             element, changes, local_changes_action='chmod group') as scope:
         metadata = element_metadatas.Services(self.context)
         metadata.setGroupPermissions(element.metadata, permissions,
                                      scope.changes, commit)
     return element
Beispiel #2
0
 def chown(self,
           element: Element,
           user,
           changes: HistoryTransferObject = None,
           commit=True):
     with self.__getHistoryScope(element,
                                 changes,
                                 local_changes_action='chown') as scope:
         metadata = element_metadatas.Services(self.context)
         metadata.setOwner(element.metadata, user, scope.changes, commit)
     return element
Beispiel #3
0
 def __init__(self, context, *args, **kwargs):
     self.histories = element_histories.Services(context)
     self.metadatas = element_metadatas.Services(context)
     self.elements = elements.Services(context)
     return super().__init__(context, *args, **kwargs)
Beispiel #4
0
 def __init__(self, context, *args, **kwargs):
     super().__init__(context, *args, **kwargs)
     self.metadatas = element_metadatas.Services(context)
     self.elements = elements_services.Services(context)