Italiano

Table of Contents

Table of Contents

Promote a ApiShare user to tenant owner

Promote a ApiShare user to tenant owner

Promote a ApiShare user to tenant owner

Table of Contents

Table of Contents

This guide provides the necessary steps to promote a user who has logged in at least once to ApiShare to the Tenant Owner role.

Note: The Tenant Owner role is not considered as a service account user.

Prerequisites

  • The user has completed the first login to ApiShare and exists on both the IDP and the ApiShare database.

Operational Steps

Step 1: Retrieve the User ID

Retrieve the userId of the user from the “apishare_db_<tenantName>."as_user table.

Step 2: Check User Group Membership

Verify whether the user is part of any group by checking the “apishare_db_<tenantName>."as_group_user_role table.

  • If the user is not part of any group, proceed to the next step.

  • If the user is part of one or more groups, remove all occurrences of the user from the as_group_user_role table.

Step 3: Assign Ownership Role

Insert a new row into the as_user_owner table with the userId and the corresponding owner

psql -U postgresadmin -d apishare_db_<tenant> -c "INSERT INTO <tenant>.as_user_owner (roleid, userid) VALUES ('<ownerRoleId>', '<userId>')"

Step 4: Refresh Elasticsearch Index

Perform an index refresh in Elasticsearch to reflect the updated ownership information.

Verifications

Login to ApiShare with the promoted user account and verify the assigned role.

Menu della documentazione

Menu della documentazione

Menu della documentazione

Menu della documentazione