mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-23 06:39:18 +00:00
Fix some bugs in this now we have a UI for editing it.
This commit is contained in:
parent
0974736f2f
commit
e322ef348d
@ -4,10 +4,16 @@
|
|||||||
|
|
||||||
DROP VIEW dav_principal CASCADE;
|
DROP VIEW dav_principal CASCADE;
|
||||||
CREATE OR REPLACE VIEW dav_principal AS
|
CREATE OR REPLACE VIEW dav_principal AS
|
||||||
SELECT user_no, usr.active AS user_active, joined AS created, updated AS last_changed,
|
SELECT user_no, usr.active AS user_active, joined AS created, updated AS modified,
|
||||||
username, password, fullname, email, '/' || username || '/' AS dav_name,
|
username, password, fullname, email,
|
||||||
email_ok, date_format_type, locale,
|
email_ok, date_format_type, locale,
|
||||||
principal_id, type_id, displayname, default_privileges
|
principal_id, type_id, displayname, default_privileges,
|
||||||
|
TRUE AS is_principal,
|
||||||
|
FALSE AS is_calendar,
|
||||||
|
principal_id AS collection_id,
|
||||||
|
FALSE AS is_addressbook,
|
||||||
|
'/' || username || '/' AS dav_name,
|
||||||
|
'<DAV::collection/><DAV::principal/>'::text AS resourcetypes
|
||||||
FROM usr JOIN principal USING(user_no);
|
FROM usr JOIN principal USING(user_no);
|
||||||
|
|
||||||
CREATE or REPLACE RULE dav_principal_insert AS ON INSERT TO dav_principal
|
CREATE or REPLACE RULE dav_principal_insert AS ON INSERT TO dav_principal
|
||||||
@ -17,8 +23,8 @@ DO INSTEAD
|
|||||||
VALUES(
|
VALUES(
|
||||||
COALESCE( NEW.user_no, nextval('usr_user_no_seq')),
|
COALESCE( NEW.user_no, nextval('usr_user_no_seq')),
|
||||||
COALESCE( NEW.user_active, TRUE),
|
COALESCE( NEW.user_active, TRUE),
|
||||||
COALESCE( NEW.created, current_timestamp),
|
current_timestamp,
|
||||||
COALESCE( NEW.last_changed, current_timestamp),
|
current_timestamp,
|
||||||
NEW.username, NEW.password,
|
NEW.username, NEW.password,
|
||||||
COALESCE( NEW.fullname, NEW.displayname ),
|
COALESCE( NEW.fullname, NEW.displayname ),
|
||||||
NEW.email, NEW.email_ok,
|
NEW.email, NEW.email_ok,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user