Update policies for collaborators for stricter rules

This commit is contained in:
thiloho
2024-08-08 16:30:01 +02:00
parent bcc26322d3
commit 837729c83c
8 changed files with 85 additions and 26 deletions

View File

@@ -23,7 +23,7 @@ EXECUTE FUNCTION internal.check_role_exists();
CREATE FUNCTION
internal.encrypt_pass() RETURNS TRIGGER AS $$
BEGIN
IF TG_OP = 'INSERT' OR NEW.password_hash <> OLD.password_hash THEN
IF TG_OP = 'INSERT' OR NEW.password_hash != OLD.password_hash THEN
NEW.password_hash = crypt(NEW.password_hash, gen_salt('bf'));
END IF;
RETURN NEW;