FOR row IN
select DISTINCT note.* FROM notes.note
inner join notes.note_usager using(not_id)
+ INNER JOIN notes.note_theme USING(not_id)
+ INNER JOIN notes.theme USING (the_id)
inner join login.utilisateur_usagers_liste (prm_token, prm_grp_id, false) on utilisateur_usagers_liste.per_id = note_usager.per_id
WHERE ((prm_start ISNULL OR prm_end ISNULL) OR not_date_evenement BETWEEN p_start AND p_end)
+ AND (NOT the_confidentiel)
LOOP
RETURN NEXT row;
END LOOP;
FOR row IN
SELECT note.* FROM notes.note
INNER JOIN notes.note_usager USING(not_id)
+ INNER JOIN notes.note_theme USING(not_id)
+ INNER JOIN notes.theme USING (the_id)
WHERE per_id = prm_per_id
AND ((prm_start ISNULL AND prm_end ISNULL) OR not_date_evenement BETWEEN p_start AND p_end OR not_date_saisie BETWEEN p_start AND p_end)
+ AND (NOT the_confidentiel)
LOOP
RETURN NEXT row;
Remarque :
Nécessite le droit de configuration "Réseau"';
-CREATE OR REPLACE FUNCTION notes_theme_update(prm_token integer, prm_the_id integer, prm_the_nom character varying, prm_portails integer[]) RETURNS integer
+CREATE OR REPLACE FUNCTION notes_theme_update(prm_token integer, prm_the_id integer, prm_the_nom character varying, prm_portails integer[], prm_confidentiel boolean) RETURNS integer
LANGUAGE plpgsql
AS $$
DECLARE
BEGIN
PERFORM login._token_assert (prm_token, FALSE, TRUE);
IF prm_the_id ISNULL THEN
- INSERT INTO notes.theme (the_nom) VALUES (prm_the_nom) RETURNING the_id INTO ret;
+ INSERT INTO notes.theme (the_nom, the_confidentiel) VALUES (prm_the_nom, prm_confidentiel) RETURNING the_id INTO ret;
ELSE
- UPDATE notes.theme SET the_nom = prm_the_nom WHERE the_id = prm_the_id;
+ UPDATE notes.theme SET the_nom = prm_the_nom, the_confidentiel = prm_confidentiel WHERE the_id = prm_the_id;
ret = prm_the_id;
END IF;
DELETE FROM notes.theme_portail WHERE the_id = ret;
RETURN ret;
END;
$$;
-COMMENT ON FUNCTION notes_theme_update(prm_token integer, prm_the_id integer, prm_the_nom character varying, prm_portails integer[]) IS
+COMMENT ON FUNCTION notes_theme_update(prm_token integer, prm_the_id integer, prm_the_nom character varying, prm_portails integer[], prm_confidentiel boolean) IS
'Modifie les informations d''une boîte thématique.
Entrées :
- prm_token : Token d''authentification
- prm_the_id : Identifiant de la boîte thématique à modifier
- prm_the_nom : Nom de la boîte thématique
- prm_portails : Tableau d''identifiants de portails auxquels affecter la boîte thématique
+ - prm_confidentiel : Le contenu de la boite ne sera accessible que si une vue l''utilise explicitement
Remarque :
Nécessite le droit de configuration "Réseau"';