mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-25 23:55:57 +03:00
[PR #323] [CLOSED] Basic VMs access control #619
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/retspen/webvirtmgr/pull/323
Author: @daniviga
Created: 5/28/2014
Status: ❌ Closed
Base:
master← Head:master📝 Commits (10+)
0ffec44Merged with upstreamcc63f6bFirst stage of auth: only is_staff can access host configurationd2735eeEnable django admin interfacef00c56eMerge remote-tracking branch 'base/master'66cf1ecMerge remote-tracking branch 'base/master'0420543Added logged user name in base template666d6c6Merge remote-tracking branch 'base/master'a35e40aMerge remote-tracking branch 'base/master'37005f6Add preliminary acl support in the instance model07dde91Limit permissions on servers (add host)📊 Changes
16 files changed (+255 additions, -163 deletions)
View changed files
📝
create/views.py(+4 -0)➕
instance/admin.py(+9 -0)📝
instance/models.py(+2 -0)📝
instance/views.py(+15 -7)📝
interfaces/views.py(+4 -0)📝
networks/views.py(+7 -0)📝
secrets/views.py(+4 -0)📝
servers/views.py(+8 -0)📝
storages/views.py(+7 -0)➕
templates/403.html(+14 -0)📝
templates/base.html(+4 -2)📝
templates/instance.html(+2 -0)📝
templates/servers.html(+164 -151)📝
templates/sidebar.html(+4 -0)📝
webvirtmgr/settings.py(+2 -2)📝
webvirtmgr/urls.py(+5 -1)📄 Description
This PR is a proof of concept of adding access control on VMs to webvirtmgr.
Use case:
How it is implemented:
How it works
All the features and the VMs for which a normal user doesn't have permission are hidden in the interface. If the user tries to access them directly (for example using the URL) he will get a 403 response.
As admin user
As normal user
This is just a proof of concept (I'm not a developer, just a sysadmin), but it works for my needs. The users and acl management is very simple; but it can be expanded further and maybe moved from the Django admin interface to a custom view in the application.
Feel free to discard, merge or move the code to a custom branch.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.