Skip to content
Snippets Groups Projects
Commit 65376fa5 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Add manage flag to clients

parent 7a500fb1
Branches
No related tags found
No related merge requests found
ALTER TABLE clients ADD COLUMN manage tinyint UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE clients ADD COLUMN manage BOOL NOT NULL DEFAULT FALSE;
...@@ -53,6 +53,7 @@ CREATE TABLE IF NOT EXISTS `clients` ( ...@@ -53,6 +53,7 @@ CREATE TABLE IF NOT EXISTS `clients` (
`debug` tinyint UNSIGNED NOT NULL DEFAULT '0', `debug` tinyint UNSIGNED NOT NULL DEFAULT '0',
`write` tinyint UNSIGNED NOT NULL DEFAULT '0', `write` tinyint UNSIGNED NOT NULL DEFAULT '0',
`test` tinyint UNSIGNED NOT NULL DEFAULT '0', `test` tinyint UNSIGNED NOT NULL DEFAULT '0',
`manage` tinyint UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `clients_1` (`valid`, `secret`, `hostname`), KEY `clients_1` (`valid`, `secret`, `hostname`),
KEY `clients_2` (`valid`, `name`) KEY `clients_2` (`valid`, `name`)
......
...@@ -39,7 +39,8 @@ CREATE TABLE IF NOT EXISTS "clients" ( ...@@ -39,7 +39,8 @@ CREATE TABLE IF NOT EXISTS "clients" (
"read" boolean NOT NULL DEFAULT true, "read" boolean NOT NULL DEFAULT true,
"debug" boolean NOT NULL DEFAULT false, "debug" boolean NOT NULL DEFAULT false,
"write" boolean NOT NULL DEFAULT false, "write" boolean NOT NULL DEFAULT false,
"test" boolean NOT NULL DEFAULT false "test" boolean NOT NULL DEFAULT false,
"manage" boolean NOT NULL DEFAULT false
); );
CREATE INDEX IF NOT EXISTS "clients_1" ON "clients" ("valid", "secret", "hostname"); CREATE INDEX IF NOT EXISTS "clients_1" ON "clients" ("valid", "secret", "hostname");
......
...@@ -216,7 +216,7 @@ def SysLogger(req, socket="/dev/log", facility=logging.handlers.SysLogHandler.LO ...@@ -216,7 +216,7 @@ def SysLogger(req, socket="/dev/log", facility=logging.handlers.SysLogHandler.LO
Client = namedtuple("Client", [ Client = namedtuple("Client", [
"id", "registered", "requestor", "hostname", "name", "id", "registered", "requestor", "hostname", "name",
"secret", "valid", "read", "debug", "write", "test", "note"]) "secret", "valid", "read", "debug", "write", "test", "manage", "note"])
class Object(object): class Object(object):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment