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 NetworkAccess:
27 networkAccess: True
28
29
30doc: |
31 This tool executes an SQL statement in the database to grant
32 read priviligies to NSAPH users (memebrs of group nsaph_admin)
33
34inputs:
35 database:
36 type: File
37 doc: Path to database connection file, usually database.ini
38 inputBinding:
39 prefix: --db
40 connection_name:
41 type: string
42 doc: The name of the section in the database.ini file
43 inputBinding:
44 prefix: --connection
45 depends_on:
46 type: File?
47 doc: a special field used to enforce dependencies and execution order
48 sql:
49 type: string[]
50 default:
51 - "call public.grant_access();"
52 inputBinding:
53 position: 3
54
55outputs:
56 log:
57 type: stdout
58 err:
59 type: stderr
60
61stderr: "grant.err"
62stdout: "grant.log"