mirror of
https://github.com/lxc/incus
synced 2026-08-02 05:26:46 +00:00
incusd/daemon: Drop else branches in project expansion
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
parent
43a5ff66d2
commit
11a82f81ce
@ -359,20 +359,30 @@ func allowPermission(objectType auth.ObjectType, entitlement auth.Entitlement, m
|
||||
|
||||
if objectType == auth.ObjectTypeProfile {
|
||||
return project.ProfileProjectFromRecord(p)
|
||||
} else if objectType == auth.ObjectTypeStorageBucket {
|
||||
}
|
||||
|
||||
if objectType == auth.ObjectTypeStorageBucket {
|
||||
return project.StorageBucketProjectFromRecord(p)
|
||||
} else if objectType == auth.ObjectTypeStorageVolume {
|
||||
}
|
||||
|
||||
if objectType == auth.ObjectTypeStorageVolume {
|
||||
dbVolType, err := storagePools.VolumeTypeNameToDBType(muxVars[1])
|
||||
if err != nil {
|
||||
return projectName
|
||||
}
|
||||
|
||||
return project.StorageVolumeProjectFromRecord(p, dbVolType)
|
||||
} else if objectType == auth.ObjectTypeNetworkZone {
|
||||
}
|
||||
|
||||
if objectType == auth.ObjectTypeNetworkZone {
|
||||
return project.NetworkZoneProjectFromRecord(p)
|
||||
} else if slices.Contains([]auth.ObjectType{auth.ObjectTypeImage, auth.ObjectTypeImageAlias}, objectType) {
|
||||
}
|
||||
|
||||
if slices.Contains([]auth.ObjectType{auth.ObjectTypeImage, auth.ObjectTypeImageAlias}, objectType) {
|
||||
return project.ImageProjectFromRecord(p)
|
||||
} else if slices.Contains([]auth.ObjectType{auth.ObjectTypeNetwork, auth.ObjectTypeNetworkACL, auth.ObjectTypeNetworkAddressSet}, objectType) {
|
||||
}
|
||||
|
||||
if slices.Contains([]auth.ObjectType{auth.ObjectTypeNetwork, auth.ObjectTypeNetworkACL, auth.ObjectTypeNetworkAddressSet}, objectType) {
|
||||
return project.NetworkProjectFromRecord(p)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user