Add granular permissions for the Image, Snapshot, Volume entities.
AWS Cloud Image:
View any AWS Cloud Image
View own AWS Cloud Image
Edit any AWS Cloud Image
Edit own AWS Cloud Image
AWS Cloud Volume:
View any AWS Cloud Volume
View own AWS Cloud Volume
Edit any AWS Cloud Volume
Edit own AWS Cloud Volume
AWS Cloud Snapshot:
View any AWS Cloud Snapshot
View own AWS Cloud Snapshot
Edit any AWS Cloud Snapshot
Edit own AWS Cloud Snapshot
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3041538-6.patch | 73.19 KB | baldwinlouie |
Comments
Comment #2
baldwinlouie commentedAdding patch with this functionality. In addition, I performed the following:
1. Add support in \Drupal\cloud\Controller\CloudConfigController::access for AND and OR permission combinations. This is needed because some urls such as entity.*.list_update should work for both "edit any aws cloud *" and "edit own aws cloud*"
2. Changed the visibility field in Image entity from varchar to boolean. The value coming from aws is a boolean field, so this matches it up.
3. For Volume permissions, if a volume is not assigned with Drupal UID, I try to derive it from the instance its attached to. This is because a volume is usually created when you launch an instance. The volume *technically* belongs to that instance, so it should take the instance's Drupal UID.
Comment #4
baldwinlouie commentedupdating patch with unit test fixes.
Comment #5
baldwinlouie commentedupdating.
Comment #7
baldwinlouie commentedFixing the test case.
Comment #8
baldwinlouie commentedupdating with coder fixes.
Comment #9
yas@baldwinlouie
Thank you for providing the patch. It looks good to me.
@xiaohua-guan
@masami
What do you think?
Comment #10
baldwinlouie commentednew patch for coder fixes.
Comment #11
baldwinlouie commentedremoving last two coder errors.
Comment #12
xiaohua guan commented@baldwinlouie @yas
Thanks for the great patch! It looks OK to me!
Comment #13
masami commented@baldwinlouie
@yas
I think it good. So I changed the status to RTBC.
Comment #14
yas@xiaohua-guan
@masami
Thank you for your review. I'll merge the patch and close this issue as
Fixed.Comment #16
yas