From 739053fc201d6394995fb1c0e1e9e2ae9df9e55b Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Tue, 19 Dec 2023 10:22:48 +0100 Subject: 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. --- ogcp/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ogcp') 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, -- cgit v1.2.3-18-g5258