1### Utility to grant read (SELECT) privilege to all users in NSAPH admin role
2# Copyright (c) 2022. Harvard University
3#
4# Developed by Research Software Engineering,
5# Faculty of Arts and Sciences, Research Computing (FAS RC)
6# Author: Michael A Bouzinier
7#
8# Licensed under the Apache License, Version 2.0 (the "License");
9# you may not use this file except in compliance with the License.
10# You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS,
16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17# See the License for the specific language governing permissions and
18# limitations under the License.
19#
20
21cwlVersion: v1.2
22class: CommandLineTool
23baseCommand: [python, -m, dorieh.platform.util.psql]
24requirements:
25 InlineJavascriptRequirement: {}
26
27
28doc: |
29 This tool executes an SQL statement in the database to grant
30 read priviligies to NSAPH users (memebrs of group nsaph_admin)
31
32inputs:
33 database:
34 type: File
35 doc: Path to database connection file, usually database.ini
36 inputBinding:
37 prefix: --db
38 connection_name:
39 type: string
40 doc: The name of the section in the database.ini file
41 inputBinding:
42 prefix: --connection
43 depends_on:
44 type: File?
45 doc: a special field used to enforce dependencies and execution order
46 sql:
47 type: string[]
48 default:
49 - "call public.grant_access();"
50 inputBinding:
51 position: 3
52
53outputs:
54 log:
55 type: stdout
56 err:
57 type: stderr
58
59stderr: "grant.err"
60stdout: "grant.log"