Merge ~ack/maas:1812402-create-device-rbac into maas:master
Proposed by
Alberto Donato
Status: | Merged |
---|---|
Approved by: | Alberto Donato |
Approved revision: | c0ed2cdc00f525eeb66ffaafdf9a165b8ba2fb1a |
Merge reported by: | MAAS Lander |
Merged at revision: | not available |
Proposed branch: | ~ack/maas:1812402-create-device-rbac |
Merge into: | maas:master |
Diff against target: |
137 lines (+55/-1) 6 files modified
src/maasserver/api/devices.py (+3/-0) src/maasserver/api/tests/test_devices.py (+9/-0) src/maasserver/forms/__init__.py (+5/-0) src/maasserver/forms/tests/test_device.py (+32/-0) src/maasserver/websockets/base.py (+3/-0) src/maasserver/websockets/handlers/tests/test_device.py (+3/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Review via email: mp+367985@code.launchpad.net |
Commit message
LP: #1812402 - check if a user is allowed to create devices when RBAC is used
To post a comment you must log in.
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
This really should be done where all other permissions are done. Inside the user.has_perm().
We could add a new NodePermission or a specific DevicePermission. But I think placing this in the form, seperate from the other permission checks is the wrong place.
The permission check logic is correct, I just don't like the location of the check itself. So could it be moved to to inside the user.has_ perm(DevicePerm ission. create) or something like that.