mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Only support changing server dir in non-docker env
This commit is contained in:
parent
fdf7bd7621
commit
dd317a3460
@ -590,6 +590,12 @@ class AjaxHandler(BaseHandler):
|
|||||||
if not superuser:
|
if not superuser:
|
||||||
self.redirect("/panel/error?error=Not a super user")
|
self.redirect("/panel/error?error=Not a super user")
|
||||||
return
|
return
|
||||||
|
if self.helper.is_env_docker():
|
||||||
|
self.redirect(
|
||||||
|
"/panel/error?error=This feature is not"
|
||||||
|
" supported on docker environments"
|
||||||
|
)
|
||||||
|
return
|
||||||
new_dir = urllib.parse.unquote(self.get_argument("server_dir"))
|
new_dir = urllib.parse.unquote(self.get_argument("server_dir"))
|
||||||
self.controller.update_master_server_dir(new_dir, exec_user["user_id"])
|
self.controller.update_master_server_dir(new_dir, exec_user["user_id"])
|
||||||
return
|
return
|
||||||
|
@ -290,6 +290,7 @@ class PanelHandler(BaseHandler):
|
|||||||
page_data: t.Dict[str, t.Any] = {
|
page_data: t.Dict[str, t.Any] = {
|
||||||
# todo: make this actually pull and compare version data
|
# todo: make this actually pull and compare version data
|
||||||
"update_available": self.helper.update_available,
|
"update_available": self.helper.update_available,
|
||||||
|
"docker": self.helper.is_env_docker(),
|
||||||
"background": self.controller.cached_login,
|
"background": self.controller.cached_login,
|
||||||
"login_opacity": self.controller.management.get_login_opacity(),
|
"login_opacity": self.controller.management.get_login_opacity(),
|
||||||
"serverTZ": tz,
|
"serverTZ": tz,
|
||||||
|
@ -230,7 +230,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if data['superuser'] %}
|
{% if data['superuser'] and not data["docker"] %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-lg-12 grid-margin stretch-card">
|
<div class="col-md-12 col-lg-12 grid-margin stretch-card">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user