mirror of
https://github.com/retspen/webvirtcloud
synced 2026-03-22 18:44:49 +00:00
Merge branch 'master' of https://github.com/catborise/webvirtcloud
This commit is contained in:
commit
9f2de6d916
4 changed files with 27 additions and 1 deletions
24
accounts/migrations/0002_permissionset.py
Normal file
24
accounts/migrations/0002_permissionset.py
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Generated by Django 2.2.12 on 2020-05-27 12:29
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounts', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='PermissionSet',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'permissions': (('change_password', 'Can change password'), ),
|
||||||
|
'managed': False,
|
||||||
|
'default_permissions': (),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -9,6 +9,7 @@ from accounts.models import UserAttributes
|
||||||
class AdminTestCase(TestCase):
|
class AdminTestCase(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.client.login(username='admin', password='admin')
|
self.client.login(username='admin', password='admin')
|
||||||
|
|
||||||
def test_group_list(self):
|
def test_group_list(self):
|
||||||
response = self.client.get(reverse('admin:group_list'))
|
response = self.client.get(reverse('admin:group_list'))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ from admin.decorators import superuser_only
|
||||||
|
|
||||||
from webvirtcloud.settings import QEMU_CONSOLE_LISTEN_ADDRESSES
|
from webvirtcloud.settings import QEMU_CONSOLE_LISTEN_ADDRESSES
|
||||||
|
|
||||||
|
|
||||||
@superuser_only
|
@superuser_only
|
||||||
def create_instance_select_type(request, compute_id):
|
def create_instance_select_type(request, compute_id):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,4 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue