mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
plugin name check
This commit is contained in:
parent
b6d3a0337d
commit
93356a04cc
@ -10,7 +10,7 @@ COPY static ./static
|
||||
COPY requirements.txt main.py database.sqlite ./
|
||||
RUN apt update
|
||||
|
||||
# Install supervisords
|
||||
# Install supervisord
|
||||
RUN apt install -y supervisor
|
||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY config/cmd.sh /cmd.sh
|
||||
|
@ -19,7 +19,9 @@ def AppUpdateUser(user_name, password):
|
||||
conn.close()
|
||||
|
||||
def AppSearchUsers(user_type):
|
||||
if user_type != "nginx" or user_type != "portainer":
|
||||
if user_type == None or user_type == "undefine":
|
||||
raise CommandException(const.ERROR_CLIENT_PARAM_BLANK, "This plugin is blank!", "This plugin is blank!")
|
||||
if user_type != "nginx" and user_type != "portainer":
|
||||
raise CommandException(const.ERROR_CLIENT_PARAM_NOTEXIST, "This plugin doesn't exist!", "This plugin doesn't exist!")
|
||||
conn = sqlite3.connect('/usr/src/app/database.sqlite')
|
||||
conn.row_factory = dict_factory
|
||||
|
Loading…
Reference in New Issue
Block a user