oVirt / moVirt

A mobile client for oVirt
Apache License 2.0
50 stars 33 forks source link

add back the option to use movirt with user role only #282

Closed jelkosz closed 3 years ago

Jerzk commented 7 years ago

Hello, do we have any update regarding this issue? Because really having a hard time to find out the answer for this case. Thank you

atiratree commented 7 years ago

@Jerzk we will try to make an experimental apk with user roles available soon.

atiratree commented 7 years ago

This option can be enabled for engines 3.6.0+, but with some limitations. Search query and from parameter do not work for events (we would have to open RFE for that). That also means each entity events are not displayed correctly.

Max parameter for both and search query for vms seems to work fine.

Jerzk commented 7 years ago

If the events will display incorrect much better to remove it or remain as it is, but our concern is that as user role I must see my vms only.

atiratree commented 7 years ago

Yup, that is what I did for now, the events are limited for user roles.

Here is the branch with support for user roles https://github.com/suomiy/moVirt/tree/user-roles And here is a direct link to the apk https://github.com/suomiy/moVirt/raw/user-roles/moVirt/moVirt-release.apk

atiratree commented 7 years ago

Also the main events will be loading slower:

Jerzk commented 7 years ago

May I ask a question, isn't if we logon to moVirt with just user role only it's not able to see the components, then when we try to put with admin role we are able to use the portal. Now removing that admin role, and try to refresh the portal or logon with user again still able to see all the components. Why is that? Thanks!

atiratree commented 7 years ago

I tested this on our setups and it seemed to work fine after the user role account gets fully synced. Can you specify what kind of components you don't want to see? Can you also specify the engine version?

We are just using the API, so the components you see should be available for user roles from any REST client.

atiratree commented 7 years ago

events API bug: https://bugzilla.redhat.com/show_bug.cgi?id=1469055

Jerzk commented 7 years ago

So you mean upon your testing with just user role any is able to logon to moVirt and see the components assigned to it, like all VMs assigned to that user? Well I don't want my user to see the components such as Event logs, and other VMs that aren't assigned to him.

oVirt Engine Version: 4.1 App Version/moVirt Version: 1.7.1

jelkosz commented 7 years ago

@Jerzk the 1.7.1 does not have it, you need to try the experimental https://github.com/suomiy/moVirt/raw/user-roles/moVirt/moVirt-release.apk which was created just to try how it will work with user role only.

Jerzk commented 7 years ago

Hello, upon my testing I got some error that says "Connected to engine v3.0.0 Engines before v3.6.0 are not supported and may not work correctly. Try to install older version of mOvirt if you encounter problems." But I'm able to look at the dashboard, tried to logon with just a user role only and still no components right there I can't see my VM, but when added an administrator role it can see all components again.

Jerzk commented 7 years ago

@jelkosz @suomiy I tried that version, but I got some error as I mentioned above. And still got some problems with user role only.

atiratree commented 7 years ago

@Jerzk I am sorry, but engines before 3.6 do not have the features we need for user roles to work reasonably well. There is not much anything we can do about it. I would advise to upgrade your engine to newer version.

Jerzk commented 7 years ago

@suomiy I do have oVirt Engine Version 4.1 1

atiratree commented 7 years ago

@Jerzk there has to be something wrong with the version detection then. So moVirt defaults to admin role when it detect 3.0.

Sorry cannot do anything about it now, I am on a holiday until 15th September.