Skip to content

Commit

Permalink
updated permissions for update_presence, split
Browse files Browse the repository at this point in the history
commands and sql table data, updated test script
  • Loading branch information
anagradova committed Dec 30, 2022
1 parent 63c8bea commit cc30786
Show file tree
Hide file tree
Showing 5 changed files with 449,660 additions and 3 deletions.
2 changes: 1 addition & 1 deletion imls-backend/init/300-public_api.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ DECLARE
_min_minutes INT := 5;
_max_minutes INT := 600;
BEGIN
SELECT api.get_timezone_from_fscs_id(_fscs_id) INTO _timezone_offset;
SELECT SUBSTRING(timezone,1,3)::INTEGER FROM api.presences WHERE fscs_id = _fscs_id ORDER BY presence_id LIMIT 1 INTO _timezone_offset;
_hour := _hour - _timezone_offset;
_day_end := _day_end - _timezone_offset;

Expand Down
2 changes: 1 addition & 1 deletion imls-backend/init/400-permissions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GRANT EXECUTE ON FUNCTION api.verify_presence(character varying, timestamptz, ti
-- Private

GRANT EXECUTE ON FUNCTION api.beat_the_heart(character varying, character varying) TO sensor;
GRANT EXECUTE ON FUNCTION api.update_presence(timestamp with time zone, timestamp with time zone) TO sensor;
GRANT EXECUTE ON FUNCTION api.update_presence(character varying, character varying) TO sensor;
GRANT SELECT, INSERT ON imlswifi.heartbeats TO sensor;
GRANT USAGE ON SCHEMA api TO sensor;
GRANT USAGE ON SCHEMA imlswifi TO sensor;
Expand Down
Loading

0 comments on commit cc30786

Please sign in to comment.