[2.5, RBAC, UI, API] Operator/admin can't edit storage for machines

Bug #1811232 reported by Björn Tillenius on 2019-01-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Unassigned

Bug Description

This is testing with MAAS 2.5.1-7489-g2f25a2cc0-0ubuntu1~18.04.1.

Logged in as a user that has either the Operator or Admin role in RBAC
for the resource pool the machine belongs to, I can't edit
the storage of machines in the pool.

I should be able to admin the machine, and I can indeed modify the
network settings.

This applies to both the UI and the API. Although in the API, you
can create and delete partitions, but you can't format or mount them.

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.5.1
summary: - [2.5, RBAC] Operator can't edit storage for machines
+ [2.5, RBAC] Operator/admin can't edit storage for machines
description: updated
summary: - [2.5, RBAC] Operator/admin can't edit storage for machines
+ [2.5, RBAC, UI] Operator/admin can't edit storage for machines
description: updated
tags: added: ui

FWIW I can edit storage for a machine as admin with RBAC, not as operator.
I think the latter is expected.

Alberto Donato (ack) wrote :

Ok, it turns out you can only edit storage if you have admin on the global scope (so user.is_superuser is True).

The logic for the storage tab looks at the flag rather than permissions for displaying storage actions

Björn Tillenius (bjornt) wrote :

Turns out that the API is broken as well.

  > maas user4 partition mount wxakrn 33 28 mount_point=/
  Cannot mount partition because you don't have the permissions on a Ready node.

description: updated
tags: added: api
summary: - [2.5, RBAC, UI] Operator/admin can't edit storage for machines
+ [2.5, RBAC, UI, API] Operator/admin can't edit storage for machines
description: updated
Changed in maas:
milestone: 2.5.1 → 2.5.2
Changed in maas:
milestone: 2.5.2 → 2.5.3
Changed in maas:
milestone: 2.5.3 → 2.6.0beta2
Changed in maas:
milestone: 2.6.0beta2 → 2.6.0rc1
Changed in maas:
milestone: 2.6.0rc1 → 2.6.0rc2
Changed in maas:
milestone: 2.6.0rc2 → 2.7.0alpha1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers