Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show to users non restricted attributes #6271

Closed
Tracked by #5422
tinova opened this issue Jul 13, 2023 · 1 comment
Closed
Tracked by #5422

Only show to users non restricted attributes #6271

tinova opened this issue Jul 13, 2023 · 1 comment
Assignees

Comments

@tinova
Copy link
Member

tinova commented Jul 13, 2023

On #6129 a regular user (non admin) could not attach a disk to a VM template.

The cause of this issue is that when you get the disks that could be attached:
image
FSunstonte gets all the info from the API, and when you try to save your template, this includes a field DISK with all the info fields that returns the API. After that, if some of this fields couldn't be change by a regular user (because are in oned.conf) the creation of the VM template will fail.

Also, after correct this error sending to the creation of the VM template the field DISK with only two fields inside (IMAGE and IMAGE_UNAME) there is another problem. The second step (Advanced options) have fields that couldn't be change by a regular user:
image
For example, oned.conf have this line:
VM_RESTRICTED_ATTR = "DISK/TOTAL_BYTES_SEC"

And in the form we can set the field by the user:
image

So if the user set this field, the creation will fail.

To summarize:

  • In the form of a regular user, the fields that are not allowed to change in oned.conf will have not appear on it. This has to be dinamically because config is in oned.conf
  • For an admin user, that not applies, because he could change everything.
  • Also, there are other functionalities of the app that needs to have this functionality.
@dcarracedo
Copy link
Contributor

This issue was fixed in the development of #6154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants