2

Is it possible to change the object type of users?

CHANGE dm_user OBJECT TO my_user WHERE r_object_id = '{some id}'

Given that my_user is a subtype of dm_user, the query above results in the following error message:

[DM_QUERY_E_CHANGE_NON_SYSOBJECT]error:  "The CHANGE OBJECT statement can only be used on dm_sysobject or its subtypes."

So even though it is seemingly impossible, is there a way to hack this?

eivamu
  • 3,025
  • 1
  • 14
  • 20
  • Did you created type my_user as subtype of dm_user? – Miki Sep 17 '14 at 14:41
  • @Miki Yes :) I know it's not recommended, though. Anyhow I managed to solve the real-world problem by destroying the `dm_user`s and recreating them as `my_user`s. I'm still wondering, though, if this had been necessary to do. – eivamu Sep 17 '14 at 15:08
  • What is your dilema with it? Regarding changing object type; you could mimic this at DB level, though I think those objects would most likely wouldn't be usable as dm_user objects. In that case you didn't need to create new subtype of dm_user. You've mentioned the "real world problem". What was it? – Miki Sep 17 '14 at 18:35
  • Real world problem: A bad LDAP sync caused most users to become dm_user instead of the desired subtype. The solution was to delete all the users, repair the sync config and resync. However, had I not successfully repaired the sync config it would had been necessary to convert the users somehow. – eivamu Sep 18 '14 at 07:29

1 Answers1

1

There is a way, I tested it and it works. You need to create new user object of type you previously created it, for example:

CREATE custom_user OBJECT SET user_name = 'Test user' SET user_os_name = 'test_user' 
    SET user_address = 'no.email@for.you' 
    SET default_folder = '/Temp' 
    SET description = 'Test' 
    SET user_login_name = 'test_user'

After it I made final setup of user object through Documentum Administrator (DA): setting inline password, user privilege etc. I validated user by logging in via DA. Everything works great!

I have configured reassign details for some other user object in repository and ran Reassign Job. All user details of configured users have been successfully transfered to my test user object like it should be with this standard OOTB procedure of the reassigning users.

Toby Allen
  • 10,997
  • 11
  • 73
  • 124
Miki
  • 2,493
  • 2
  • 27
  • 39
  • Great! The Reassign Job is a very neat workaround that I didn't think about. In our specific case this wouldn't have helped though, since we need to retain the user login name because of SSO etc. At least not without some custom script to alter the login names to something obsolete/temporarily first. I'm gonna mark this as correct as I think it's the closest we'll get :) Thanks! – eivamu Sep 18 '14 at 08:55
  • You can always set login details for this user object of custom type afterwards, it should work. – Miki Sep 18 '14 at 09:06