...
 
Commits (4)
#!/bin/bash -e
log=/tmp/carnivora-dev-deploy.log
log=/tmp/carnivora-dev-deploy_`date +%F_%T`.log
yamsql=/tmp/yamsql-out
setup=../examples/setup.yml
db=postgresql://postgres@/carnivora
......
......@@ -56,6 +56,8 @@ INSERT INTO dns.service (backend_status, domain, registered, service, service_en
SELECT "user".ins_login('user-1', 'FOMgwkMXmS');
SELECT 'user login', 'user-1', 'FOMgwkMXmS';
SELECT "user".upd_user('FOMgwkMXmS');
-- EMAIL
SELECT email.ins_mailbox('have', 'fun.example', 'myPassword');
......
......@@ -52,7 +52,7 @@ master_doc = 'toc'
# General information about the project.
project = 'Carnivora'
copyright = u'2016–2017, Sophie Herold'
copyright = u'2016–2019, Sophie Herold'
author = 'Sophie Herold'
# The version info for the project you're documenting, acts as replacement for
......@@ -62,7 +62,7 @@ author = 'Sophie Herold'
# The short X.Y version.
version = '0.13'
# The full version, including alpha/beta/rc tags.
release = '0.13.1'
release = '0.13.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -1251,7 +1251,7 @@ Execute privilege
SELECT
t.registered,
COALESCE(s.domain_prefix || t.domain, t.domain)::varchar,
COALESCE(s.domain_prefix || t.domain, t.domain)::dns.t_domain,
s.type,
s.rdata,
s.ttl,
......@@ -1438,7 +1438,7 @@ Checks
.. code-block:: sql
VALUE >= 60 AND VALUE <= 172800
VALUE BETWEEN 60 AND EXTRACT(EPOCH FROM INTERVAL '2 days')
......
......@@ -262,7 +262,7 @@ Checks
.. code-block:: sql
VALUE >= 0 AND VALUE <= 65535
VALUE BETWEEN 0 AND 65535
......
......@@ -284,10 +284,7 @@ Returns
.. code-block:: plpgsql
RETURN
pg_backend_pid() || '.' ||
COALESCE((SELECT backend_start FROM pg_stat_get_activity(pg_backend_pid()))::varchar, 'xxx') || '.' ||
pg_conf_load_time();
RETURN pg_backend_pid()::varchar;
......@@ -474,14 +471,24 @@ Parameters
Variables defined for body
- ``v_owner`` :ref:`user.t_user <DOMAIN-user.t_user>`
Returns
void
Execute privilege
- :ref:`userlogin <ROLE-userlogin>`
.. code-block:: plpgsql
-- begin userlogin prelude
v_owner := (SELECT t.act_as FROM "user"._get_login() AS t);
-- end userlogin prelude
UPDATE "user".user
SET password = commons._hash_password(p_password)
......
......@@ -48,7 +48,7 @@ domains:
-
name: invalid_port
description: Only allow port values
check: VALUE >= 0 AND VALUE <= 65535
check: VALUE BETWEEN 0 AND 65535
-
name: t_password
type: varchar(250)
......
......@@ -5,4 +5,4 @@ checks:
-
name: ttl range
description: Ensure that TTL is at least one minute and put maximum to 48h
check: VALUE >= 60 AND VALUE <= 172800
check: VALUE BETWEEN 60 AND EXTRACT(EPOCH FROM INTERVAL '2 days')
......@@ -74,7 +74,7 @@ RETURN QUERY
SELECT
t.registered,
COALESCE(s.domain_prefix || t.domain, t.domain)::varchar,
COALESCE(s.domain_prefix || t.domain, t.domain)::dns.t_domain,
s.type,
s.rdata,
s.ttl,
......
......@@ -7,11 +7,6 @@ description: |
Not sure if this stays unique with distributed infrastructure!
returns: varchar
security_definer: false
owner: system
---
RETURN
pg_backend_pid() || '.' ||
COALESCE((SELECT backend_start FROM pg_stat_get_activity(pg_backend_pid()))::varchar, 'xxx') || '.' ||
pg_conf_load_time();
RETURN pg_backend_pid()::varchar;
......@@ -2,6 +2,9 @@
name: upd_user
description: change user passwd
templates:
- user.userlogin
returns: void
parameters:
......
......@@ -67,4 +67,6 @@ RETURN QUERY
WHERE
backend._machine_priviledged(t.service, t.domain) AND
(backend._active(t.backend_status) OR p_include_inactive);
(backend._active(t.backend_status) OR p_include_inactive)
ORDER BY t.domain, t.port;
......@@ -58,6 +58,7 @@ foreign_keys:
- user
- service_entity_name
- owner
on_update: cascade
unique:
-
......