imrahil / OctoPrint-PrintHistory

Plugin for OctoPrint - saves filename, print time and filament usage for each print
GNU Affero General Public License v3.0
64 stars 64 forks source link

Track User Prints #20

Closed lovesegfault closed 4 days ago

lovesegfault commented 8 years ago

It would be nice to make use of the User Access Control feature to also log which user issued which print. On a multi-user environment having something like this could be particularly useful. @imrahil do you think this is possible?

bastard commented 8 years ago

I agree - it should take care of the user level as well. The user should be able to edit his entry but is not allowed to delete it.

motzke commented 8 years ago

I would like to see which user has printed what!

Pinaute commented 7 years ago

Hi @imrahil
What file provided data Filename Date, Print time, ... ? I'm going to try fix the issue

danielwells commented 7 years ago

Looks like you've already added this as an enhancement but I wanted to put in my vote for it as well. I'd love the "user" to be added as a column in the export as well. Thanks.

cmtec commented 7 years ago

+1 Seems that the main feature is already implemented (in v1.1?) but I would like that the user been added automatically. Right now I have too guess what user did the print and manually add him/her.

imrahil commented 7 years ago

sorry but I can't - AFAIK there is no way to get current user data on backend side

cmtec commented 7 years ago

Hi @imrahil Ok. Question: is "current_user.get_name()" not accessible as a plugin?

imrahil commented 7 years ago

print details are provided in event handler which is run in different thread than rest of the backend... I didn't find a way how to workaround this.

danielwells commented 7 years ago

Has this been added as a feature request in OctoPrint core then (to get access to the user)?

WildRikku commented 5 days ago

Hi @imrahil Ok. Question: is "current_user.get_name()" not accessible as a plugin?

This would not be a good solution, as a print could have been started by a different user than the current user and also a print might finish when no user is logged in.