Hide most fields from management tab for archive unit of simplified profiles
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 25 Aug 2016 16:16:06 +0200
changeset 1551 16d80699b01f
parent 1550 01b8fdd3e2b0
child 1552 05bfdace8af8
Hide most fields from management tab for archive unit of simplified profiles
views/archiveunit.py
--- a/views/archiveunit.py	Thu Aug 25 17:53:34 2016 +0200
+++ b/views/archiveunit.py	Thu Aug 25 16:16:06 2016 +0200
@@ -181,6 +181,19 @@
         super(ArchiveUnitManagementTab, self).entity_call(seq, **kwargs)
 
 
+class SimplifiedArchiveUnitManagementTab(ArchiveUnitManagementTab):
+    __select__ = ArchiveUnitManagementTab.__select__ & simplified_profile()
+
+    rtype_role_targets = [
+        ('seda_appraisal_rule', 'object', None),
+        ('seda_access_rule', 'object', None),
+        ('seda_classification_rule', 'object', None),
+    ]
+    rsection, display_ctrl = rtags_from_rtype_role_targets(
+        'SEDASeqAltArchiveUnitArchiveUnitRefIdManagement', rtype_role_targets
+    )
+
+
 class ArchiveUnitSubObjectsTab(viewlib.SubObjectsTab):
     """Abstract subobjects tab specific to archive unit to handle proper redirection"""