Manage "importer" field through API user

Answered

Comments

4 comments

  • Avatar
    Erik Korver

    Hi Rogier,

    The "api-user" name is simply derived from the username in internal-user.properties.

    api-user=<password>,ROLE_API_USER

    If you want to have a different name for this user, just rename the user in the internal-user.properties and make sure all api calls use that user name instead.

    For example use the name "Importer"

    Importer=<password>,ROLE_API_USER

    Does this answer your question?

    Note: If this conflicts somehow with other processes that also use this API user license you could buy an extra license to be used just by this differently named API user.

    0
    Comment actions Permalink
  • Avatar
    Rogier Lommers

    Hey Erik,

    Please see below screenshot. We have a service which does a lot of business logic. Our end-users connect to that service. Finally, when we want to save an asset to Elvis, the service connects to Elvis as an API user.

    Now what we want is that if user 1 is uploading an asset though the service, that his/her username is also propagated to the "importer" field in Elvis (instead of the API user itself)

    Does this make sense?

    0
    Comment actions Permalink
  • Avatar
    Erik Korver

    Hi Rogier,

    It does. Thanks for adding the screenshot.

    • Since the user1 and user2 are not actually connect to Elvis directly they are not seen as the "importer" of the asset. 
    • User1 and user2 are probably also not known and/or licensed users in Elvis.

    This would make it hard for Elvis to know what user did what in the Elvis system.

    Make the "assetCreator"(=importer) an editable metadata field
    An option could be to create a fieldExt for the "assetCreator" metadata field in the custom-assetInfo.xml to make this metadata field editable="true". 
    This way the "Service X" can connect with Elvis using an API user to perform the actual upload/import action and also change the "assetCreator" value to that importer-user.

    Note that Service X does need to have information about the user that is accessing its service and it must be able to re-use/push that information in the API call to Elvis.

    Would that be an option?

    1
    Comment actions Permalink
  • Avatar
    Rogier Lommers

    Thanks! This will work; we'll try in a few weeks. If it doen't work, I'll let you know. Ticket can be closed for now.

    0
    Comment actions Permalink

Please sign in to leave a comment.