#5254 obj-mod commands that cannot rename entries should not offer --rename
Opened 3 years ago by ftweedal. Modified 2 years ago

Some LDAP objects (including certificate profiles and ID overrides)
cannot be renamed; the command offers the --rename option but this
case is checked in command logic.

It would be better to add an attribute to LDAPObject to signal
that rename is not available for those objects, which would
result in the `rename' option not being added, and allowing
the validation logic to be removed.


  • mkosek: well, the option should not have got there in the first place
  • mkosek: can we just remove the API that way? Wouldn't it be better to hide --rename CLI but respond to "rename" API call from older version with error for 4.2 time being?
  • pvoborni: +1
  • rcrit +1 on that. I wonder if a class variable can be added that defaults to True: rename_allowed (or something obvious). Then those few plugins that don't do renames can add rename_allowed = False and it simply won't show up as an option.
  • H: setting rdn_is_primary_key to False has this effect (and only this effect)
    • ftweedal: does this affect API or CLI only?
      • API

Metadata Update from @ftweedal:
- Issue assigned to someone
- Issue set to the milestone: FreeIPA 4.5 backlog

2 years ago

Login to comment on this ticket.

Metadata