Allow show assigned repo in image/create

Allow only the creation of images in the repository that is currently
assigned to the selected client.

This operation is still not handled in ogserver and oglive, it needs
more work behind the scenes: it needs an update in the templates and
it also needs the new ogLive builder so ogClient has control on the
samba mount.
master
Javier Hernandez 2023-12-19 10:22:48 +01:00 committed by OpenGnSys Support Team
parent 67cca9872a
commit 739053fc20
1 changed files with 1 additions and 3 deletions

View File

@ -1269,9 +1269,7 @@ def action_image_create():
repositories = get_repositories(server)
form.repository.choices = [ (repo['id'], repo['name']) for repo in repositories
if client_repo_id == repo['id']]
for repo in repositories:
if client_repo_id != repo['id']:
form.repository.choices.append((repo['id'], repo['name']))
form.repository.render_kw = {'readonly': True}
scopes, clients = get_scopes(set(ips))
return render_template('actions/image_create.html', form=form,