improve mobile view for my orders
remove otp requirement from doctor
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
CREATE OR REPLACE FUNCTION medreport.is_doctor()
|
||||
RETURNS BOOLEAN
|
||||
LANGUAGE plpgsql
|
||||
SECURITY DEFINER
|
||||
AS $$
|
||||
BEGIN
|
||||
RETURN EXISTS (
|
||||
SELECT 1
|
||||
FROM medreport.accounts
|
||||
WHERE primary_owner_user_id = auth.uid()
|
||||
AND application_role = 'doctor'
|
||||
);
|
||||
END;
|
||||
$$;
|
||||
grant execute on function medreport.is_doctor() to authenticated;
|
||||
Reference in New Issue
Block a user