Compare commits

...

4 Commits

Author SHA1 Message Date
feng626
e56fc93a6e fix: 组织管理员 添加 view platform perm 2022-04-28 19:10:15 +08:00
fit2bot
eb17183d97 fix: workbench_orgs 去重 (#8151)
Co-authored-by: feng626 <1304903146@qq.com>
2022-04-25 11:39:51 +08:00
feng626
b0057ecb9d perf: client download 2022-04-24 15:09:50 +08:00
ibuler
a141a8d2c2 fix: 修复社区版跳转问题 2022-04-21 22:48:34 +08:00
3 changed files with 14 additions and 22 deletions

View File

@@ -91,7 +91,7 @@ exclude_permissions = (
only_system_permissions = ( only_system_permissions = (
('assets', 'platform', '*', '*'), ('assets', 'platform', 'add,change,delete', 'platform'),
('users', 'user', 'delete', 'user'), ('users', 'user', 'delete', 'user'),
('rbac', 'role', 'delete,add,change', 'role'), ('rbac', 'role', 'delete,add,change', 'role'),
('rbac', 'systemrole', '*', '*'), ('rbac', 'systemrole', '*', '*'),

View File

@@ -1,6 +1,7 @@
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.db import models from django.db import models
from django.db.models import Q from django.db.models import Q
from django.conf import settings
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from rest_framework.serializers import ValidationError from rest_framework.serializers import ValidationError
@@ -111,10 +112,13 @@ class RoleBinding(JMSModel):
system_bindings = [b for b in bindings if b.scope == Role.Scope.system.value] system_bindings = [b for b in bindings if b.scope == Role.Scope.system.value]
# 工作台仅限于自己加入的组织 # 工作台仅限于自己加入的组织
if perm == 'rbac.view_workbench': if perm == 'rbac.view_workbench':
all_orgs = user.orgs.all() all_orgs = user.orgs.all().distinct()
else: else:
all_orgs = Organization.objects.all() all_orgs = Organization.objects.all()
if not settings.XPACK_ENABLED:
all_orgs = all_orgs.filter(id=Organization.DEFAULT_ID)
# 有系统级别的绑定,就代表在所有组织有这个权限 # 有系统级别的绑定,就代表在所有组织有这个权限
if system_bindings: if system_bindings:
orgs = all_orgs orgs = all_orgs

View File

@@ -15,45 +15,33 @@ p {
</style> </style>
<div style="margin: 0 200px"> <div style="margin: 0 200px">
<div class="group"> <div class="group">
<h2>JumpServer {% trans 'Client' %}</h2> <h2>JumpServer {% trans 'Client' %} v1.1.4</h2>
<p> <p>
{% trans 'JumpServer Client, currently used to launch the client, now only support launch RDP SSH client, The Telnet client will next' %} {% trans 'JumpServer Client, currently used to launch the client, now only support launch RDP SSH client, The Telnet client will next' %}
{# //JumpServer 客户端,支持 RDP 的本地拉起,后续会支持拉起 ssh。#}
</p> </p>
<ul> <ul>
<li> <a href="/download/JumpServer-Client-Installer.msi">Windows {% trans 'Client' %}</a></li> <li> <a href="/download/JumpServer-Client-Installer-x86_64.msi">jumpserver-client-windows-x86_64.msi</a></li>
<li> <a href="/download/JumpServer-Client-Installer.dmg">macOS {% trans 'Client' %}</a></li> <li> <a href="/download/JumpServer-Client-Installer-arm64.msi">jumpserver-client-windows-arm64.msi</a></li>
<li> <a href="/download/JumpServer-Client-Installer.dmg">jumpserver-client-darwin.dmg</a></li>
</ul> </ul>
</div> </div>
<div class="group"> <div class="group">
<h2>{% trans 'Microsoft' %} RDP {% trans 'Official' %}{% trans 'Client' %}</h2> <h2>{% trans 'Microsoft' %} RDP {% trans 'Official' %}{% trans 'Client' %} v10.6.7</h2>
<p> <p>
{% trans 'macOS needs to download the client to connect RDP asset, which comes with Windows' %} {% trans 'macOS needs to download the client to connect RDP asset, which comes with Windows' %}
</p> </p>
<ul> <ul>
<li><a href="/download/Microsoft_Remote_Desktop_10.6.7_installer.pkg">Microsoft_Remote_Desktop_10.6.7_installer.pkg</a></li> <li><a href="/download/Microsoft_Remote_Desktop_10.6.7_installer.pkg">microsoft-remote-desktop-installer.pkg</a></li>
</ul>
</div>
<div class="group">
<h2>SSH {% trans 'Client' %}</h2>
<p>
{% trans 'Windows needs to download the client to connect SSH assets, and the MacOS system uses its own terminal' %}
</p>
<ul>
<li><a href="/download/putty/w64/putty.exe">64-bit x86: Putty.exe</a></li>
<li><a href="/download/putty/wa64/putty.exe">64-bit Arm: Putty.exe</a></li>
<li><a href="/download/putty/w32/putty.exe">32-bit x86: Putty.exe</a></li>
</ul> </ul>
</div> </div>
{% if XPACK_ENABLED %} {% if XPACK_ENABLED %}
<div class="group"> <div class="group">
<h2>{% trans 'Windows Remote application publisher tools' %}</h2> <h2>{% trans 'Windows Remote application publisher tools' %} v2.0</h2>
<p>{% trans 'Jmservisor is the program used to pull up remote applications in Windows Remote Application publisher' %}</p> <p>{% trans 'Jmservisor is the program used to pull up remote applications in Windows Remote Application publisher' %}</p>
<ul> <ul>
<li><a href="/download/Jmservisor.msi">Jmservisor</a></li> <li><a href="/download/Jmservisor.msi">jmservisor.msi</a></li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}