summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-12-19 10:22:48 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-19 10:42:28 +0100
commit739053fc201d6394995fb1c0e1e9e2ae9df9e55b (patch)
treee152e326fc2eb939ee1dda4284bf363026088a4a /ogcp
parent67cca9872a7d8ade5b67b6649171e6e275bc5c87 (diff)
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.
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/views.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index a10c9c4..edf61dd 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -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,