Book a Demo

Author Topic: Getting the current author from the Repository  (Read 3216 times)

Heidi Thomson

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Getting the current author from the Repository
« on: May 05, 2011, 02:08:39 am »
Hi,

I'm scripting a way of automating our baselines and in the comments, I'd like to include the person who is running the script via EA.  I was planning on using the Repository.GetCurrentLoginUser but we don't have security enabled on our model.  I also tried to access the authors from the Repository.Authors but the count was zero.

Are there any other methods for getting this information?

Thanks,
Heidi

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Getting the current author from the Repository
« Reply #1 on: May 05, 2011, 04:25:29 pm »
Heidi,

If you're not using security, then EA has no way of knowing which author is using the tool.
I suppose the only option you have is to ask Windows which user is currently logged in.

Geert

Heidi Thomson

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Getting the current author from the Repository
« Reply #2 on: May 05, 2011, 05:48:59 pm »
Thanks Geert,

I'll have a look at the benefits of adding security to the model.

Thanks,
Heidi