Adding an alternate owner to Communities
Use scripts accessed using the wsadmin command-line tool to designate an alternate owner for the communities and subcommunities owned by a specific user.
Before you begin
About this task
Procedure
To add an alternate owner to the communities and subcommunities
owned by a specific user, complete the following steps.
- Start the wsadmin client from the following
directory of the system on which you installed the Deployment Manager:
where app_server_root is the WebSphere® Application Server installation directory and dm_profile_root is the Deployment Manager profile directory, typically dmgr01.app_server_root\profiles\dm_profile_root\bin
You must start the client from this directory or subsequent commands that you enter will not execute correctly.
- Start the Communities Jython script interpreter
using the following command:
If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, you must pick the node where the file is stored.execfile("communitiesAdmin.py")
- Use the following command:
- CommunitiesService.addAlternateOwner(String directoryUuid, String alternateDirectoryUuid, Boolean removeOriginal)
-
Adds the user with the specified alternateDirectoryUuid as an owner to every community and subcommunity owned by the user with the specified directoryUuid (external ID).
This command takes the following parameters:- directoryUuid
- A string that specifies the directory UUID (external ID) of an existing community or subcommunity owner.
- alternateDirectoryUuid
- A string that specifies the directory UUID (external ID) of the person who you want to add as the alternate owner.
- removeOriginal
- A Boolean value that determines whether the person specified using the directoryUuid (external ID) parameter is removed from the membership of their communities and subcommunities. When set to true, the user with the specified directoryUuid is removed from their community and subcommunity membership. When set to false, the user with the specified directoryUuid remains listed as an owner of their communities and subcommunities.
For example:
To obtain the value to use for the directoryUuid and alternateDirectoryUuid parameters, you can use the following command:CommunitiesService.addAlternateOwner ("193F1CE8-E10A-4B9A-B933-C8ECD6C072E4", "EC8A89C0-F41D-102C-9B60-F225BC6C4AF4", "true")
In the following example, for any community (or subcommunity) where Paul Smith is an owner, user Alice Lee is added to the membership list with owner access, and Paul Smith is removed from the membership list:CommunitiesMemberService.getMemberExtIdByEmail("email_address")
wsadmin>CommunitiesMemberService.getMemberExtIdByEmail ("paul_smith@example.com") 510b99c0-0123-1010-8989-f78755f7e0ed wsadmin> wsadmin>CommunitiesMemberService.getMemberExtIdByEmail ("alice_lee@example.com") 510b99c0-0101-102e-8934-f78755f7e0ed wsadmin> wsadmin>CommunitiesService.addAlternateOwner ("510b99c0-0123-1010-8989-f78755f7e0ed", "510b99c0-0101-102e-8934-f78755f7e0ed", "true")