Bug 56172 - Object copy fails if extended attributes for operational LDAP attributes are defined - bug in "copyable" flag?
Summary: Object copy fails if extended attributes for operational LDAP attributes are ...
Status: NEW
Alias: None
Product: UCS
Classification: Unclassified
Component: UDM - Extended Attributes
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UMC maintainers
QA Contact: UMC maintainers
URL:
Keywords:
Depends on:
Blocks: 58502
  Show dependency treegraph
 
Reported: 2023-06-20 14:22 CEST by Ingo Steuwer
Modified: 2025-08-07 18:15 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Steuwer univentionstaff 2023-06-20 14:22:32 CEST
Orginal bug report: https://help.univention.com/t/when-was-an-ldap-object-created-or-modified-display-ldap-operational-attributes-in-extended-attributes/20968/6?u=steuwer

To reproduce I created the 4 Extended Attributes for groups and users and tried to copy a group using UMC. I also had the error message "Das LDAP-Objekt konnte nicht gespeichert werden: LDAP-Fehler: Constraint violation: createTimestamp: no user modification allowed."

The same error occures if I want to copy a user object.

I assume that UDM tries to write something in the "createTimestamp" LDAP attribute, which is not allowed. Looking at the documentation I think not setting the "copyable" flag should prevent such a behaviour, but that is not the case here (the value is "None").

Full definition of the Extended Attribute:

DN: cn=createTimestamp,cn=custom attributes,cn=univention,[LDAP BASE]
  CLIName: createTimestamp
  copyable: None
  default: None
  deleteObjectClass: None
  disableUDMWeb: None
  doNotSearch: None
  fullWidth: None
  groupName: object creation
  groupPosition: 1
  hook: None
  ldapMapping: createTimestamp
  longDescription: Database timestamp of the LDAP object creation, typically UTC
  mayChange: None
  module: users/user
  module: groups/group
  multivalue: None
  name: createTimestamp
  notEditable: 0
  objectClass: top
  overwritePosition: None
  overwriteTab: None
  shortDescription: timestamp of object creation
  syntax: string
  tabAdvanced: None
  tabName: LDAP details
  tabPosition: 1
  translationGroupName: de_DE: Objekterstellung
  translationLongDescription: de_DE: Zeitpunkt der Erstellung des LDAP Objekts, typischer Weise UTC
  translationShortDescription: de_DE: Zeitstempel der Objekterstellung
  translationTabName: de_DE: LDAP Details
  valueRequired: None
  version: 2
Comment 1 Ingo Steuwer univentionstaff 2023-06-20 14:24:35 CEST
This might also be the root cause of Bug #55670
Comment 2 Julia Bremer univentionstaff 2024-08-13 08:52:54 CEST
The property copyable is defined "wrong". At least in comparison to mayChange and the others.

copyable=None or copyable=0 means results in the property being copyable
copyable=1 means the property is not copyable. :/

So you would get what you look for if you set copyable=1
Comment 3 Florian Best univentionstaff 2025-08-07 18:15:47 CEST
This is simply wrong - but only for extended attributes.
I would propose to just fix it:

diff --git management/univention-directory-manager-modules/modules/univention/admin/modules.py management/univention-directory-manager-modules/modules/univention/admin/modules.py
index 8f7149c0b94..685a721882b 100644
--- management/univention-directory-manager-modules/modules/univention/admin/modules.py
+++ management/univention-directory-manager-modules/modules/univention/admin/modules.py
@@ -400,7 +400,7 @@ def update_extended_attributes(lo: univention.admin.uldap.access, module: UdmMod
         # value is editable (only via hooks or direkt module.info[] access)
         editable = attrs.get('univentionUDMPropertyValueNotEditable', [b'0'])[0] not in [b'1', b'TRUE']
 
-        copyable = attrs.get('univentionUDMPropertyCopyable', [b'0'])[0] not in [b'1', b'TRUE']
+        copyable = attrs.get('univentionUDMPropertyCopyable', [b'0'])[0] in [b'1', b'TRUE']
 
         # value is required
         valueRequired = attrs.get('univentionUDMPropertyValueRequired', [b'0'])[0].upper() in [b'1', b'TRUE']