Feature request: clientPreAuthorization or clientOnConnection

15 posts / 0 new
Last post
amatveev
Feature request: clientPreAuthorization or clientOnConnection

It would be very useful to have an ability to give user permissions even before it connects to USB device:

For example:
- show only permitted USB devices (this is the most desired option for me)
- restrict user rights (disable all Auto-Use options, Properties, Rename, etc)
- become an admin without using /admin key (or restrict admin access even the user specifies /admin key)

It looks like a user management functionality. Very strange that such nice peace of software doesn't have it already.

Michael
.

You can hide any menu items you want in the client by editing the client vhui.ini file and changing the line HideMenuItems. List the exact (case senstive) names of the menu items you want to hide.

e.g in the vhui.ini
[General]
...
HideMenuItems=Start minimized,System Messages
...

Ive tended to steer clear up to now of implementing full device/user/rights management because I dont get many requests for this, and its adds unnecessary complexity for most users, and administration can get very complicated very quickly. ill see what i can come up with regarding the password protection for a device. I think i can create a simple password callback mechanism, i will work on this and let you know.

amatveev
[General]

[General]
AdminMode=0
HideMenuItems=Auto-Use Device,Auto-Use Port,Auto-Use Device/Port,Rename...,Properties,Auto-Find Hubs,Ignore...

Restarted the client - all the menu items on there place(

Michael
I did this:

I did this:

1. Stop and exit the client
2. I copied that exact line as you specified into my c:\Users\Michael\AppData\Roaming\vhui.ini
3. I started the client, and now i dont see any of those menu items, in the device menu i just see "Use" and "Custom Event Handler..."

So its definately working, you probably edited the wrong file or changed it while the client was running.

amatveev
Right, it works as expected

Right, it works as expected

(it started the client with -c parameter and relative path - see my another thread/bug report)

amatveev
Michael, thanks for answer

Michael, thanks for answer

Well, hiding menu option it's quite useful but what to do with hiding (filtering) USB devices user can see in the client (in case when there lots of USB devices connected and user has an access to only one?

+1 Vote to full user management on server side :)

Michael
I checked and implementing

I checked and implementing filtering per user is too complicated a change at this point, its probably useful but it will be towards the bottom of my todo list...

toxot
Michael, maybe you can

Michael, maybe you can implement same funcionality that we already have (clientAuthorization) but for renaming device, it doesnt add complexity but it can really overclose this question. Is it possible?

Michael
.

Yes i can add that in the next build...

slakwik
- show only permitted USB

- show only permitted USB devices (this is the most desired option for me)
Yes, this option is the most desired!

Michael
.

Showing only the permitted devices cannot be implemented easily so it wont be added for the time being...

Michael
.

@toxot

OK if you download the virtualhere server 3.3.0 it contains support to selectively deny the device rename feature. Just return 1 to deny the rename request.

E.g use it like this:

config.ini

...
...
onChangeNickname=/home/pi/onChangeNickname.sh "$VENDOR_ID$" "$PRODUCT_ID$" "$DEVPATH$" "$NICKNAME$" "$NEW_NICKNAME$"

onChangeNickname.sh

#!/bin/sh
#  "$VENDOR_ID$" "$PRODUCT_ID$" "$DEVPATH$" "$NICKNAME" "$NEW_NICKNAME$"

logger "\"$1\"" "\"$2\"" "\"$3\"" "\"$4\"" "\"$5\""

# OK to change nickname
# exit 0 (or leave out exit entirely as the default is 0)

# NOT ALLOWED TO CHANGE NICKNAME
# exit 1
slakwik
2Michael

2Michael
>>>#11 Showing only the permitted devices cannot be implemented easily so it wont be added for the time being...
thanks for reply
I'll be waiting for this feature.

toxot
Thank you so much!

@Michael,
Hi, ive checked and it works! I used client only for connection, not for managment, so my opinion that users (client side) should be readonly in most of cases (if its tunable its really awesome), for stable operating of system with multi-clients/customers etc.

Michael
.

Ive avoided having too much server admin in the client but i will add more in the future so that the server is more configurable from the client without having to edit config.ini files etc.

Log in or register to post comments