Skip to content

Commit

Permalink
Added permission assignment to auto_rank.py (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewp-CWF authored Aug 8, 2024
1 parent 359e322 commit 4f67ef1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jobs/auto_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,12 @@ def runQuery(condition, wcrp, wcrp_schema, conn):
on c.aggregated_crossings_id = cv.aggregated_crossings_id
where {condition}
order by rank_combined
)
);
ALTER TABLE wcrp_{wcrp_schema}.ranked_barriers_{wcrp} GRANT SELECT TO cwf_user;
ALTER TABLE wcrp_{wcrp_schema}.ranked_barriers_{wcrp} GRANT ALL TO cwf_analyst;
ALTER TABLE wcrp_{wcrp_schema}.ranked_barriers_{wcrp} GRANT SELECT TO bcfishpass_user;
ALTER TABLE wcrp_{wcrp_schema}.ranked_barriers_{wcrp} GRANT ALL TO cwf_analyst;
"""
cursor.execute(q_wcrp_rank_table)
conn.commit()
Expand Down

0 comments on commit 4f67ef1

Please sign in to comment.