use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class MoveDiskCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
List<PermissionSubject> permissionList = new ArrayList<>();
permissionList.add(new PermissionSubject(getParameters().getImageGroupID(), VdcObjectType.Disk, ActionGroup.CONFIGURE_DISK_STORAGE));
permissionList.add(new PermissionSubject(getParameters().getStorageDomainId(), VdcObjectType.Storage, ActionGroup.CREATE_DISK));
return permissionList;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class MoveOrCopyDiskCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
if (cachedPermsList == null) {
cachedPermsList = new ArrayList<>();
DiskImage image = getImage();
Guid diskId = image == null ? Guid.Empty : image.getId();
cachedPermsList.add(new PermissionSubject(diskId, VdcObjectType.Disk, ActionGroup.CONFIGURE_DISK_STORAGE));
cachedPermsList.add(new PermissionSubject(getParameters().getStorageDomainId(), VdcObjectType.Storage, ActionGroup.CREATE_DISK));
}
return cachedPermsList;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class RemoveDiskCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
if (permsList == null && getDisk() != null) {
permsList = new ArrayList<>();
permsList.add(new PermissionSubject(getDisk().getId(), VdcObjectType.Disk, ActionGroup.DELETE_DISK));
}
return permsList;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class AttachDiskToVmCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
if (permsList == null) {
permsList = super.getPermissionCheckSubjects();
Guid diskId = disk == null ? null : disk.getId();
permsList.add(new PermissionSubject(diskId, VdcObjectType.Disk, ActionGroup.ATTACH_DISK));
}
return permsList;
}
use of org.ovirt.engine.core.bll.utils.PermissionSubject in project ovirt-engine by oVirt.
the class RemoveDiskSnapshotsCommand method getPermissionCheckSubjects.
@Override
public List<PermissionSubject> getPermissionCheckSubjects() {
List<PermissionSubject> permissionList = new ArrayList<>();
permissionList.add(new PermissionSubject(getVmId(), VdcObjectType.VM, getActionType().getActionGroup()));
return permissionList;
}
Aggregations