Created
October 31, 2019 07:29
-
-
Save MarcelloTheArcane/b3b9a27a4995118bc023dd151d0be773 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
name: '', | |
authentication: { | |
providers: { | |
local: true, | |
google: false, | |
facebook: false, | |
github: false, | |
}, | |
provider_urls: { | |
success: '', | |
failure: '', | |
}, | |
}, | |
storage: { | |
storagePermission: (key, type, _claims) => { // sets exports.storagePermission | |
// accept read to public directory | |
const res = key.match(/\/public\/.*/) | |
if (res) { | |
if (type === 'read') { | |
return true | |
} | |
} | |
return false | |
} | |
}, | |
settings: { | |
hasura: { | |
version: '', | |
unauthorized_role: '', | |
}, | |
authentication: { | |
auto_registration: false, | |
permission_variables: [ | |
'', | |
], | |
jwt_expiration: 15, | |
refetch_expiration: 54000, | |
}, | |
postgresql: { | |
version: '', | |
}, | |
}, | |
roles: [], | |
schemas: { // Adds new schemas from keys | |
public: { // Adds new tables from keys | |
table_name: { | |
columns: [ | |
{ | |
column_name: '', | |
column_type: '', | |
default_value: '', | |
nullable: false, | |
unique: false, | |
}, | |
], | |
primary_key: '', | |
foreign_keys: [], | |
unique_keys: [], | |
comment: '', | |
relationships: [ // From 'Add a new relationship manually' | |
{ | |
type: '', | |
name: '', | |
schema: '', | |
table: '', | |
from: '', | |
to: '', | |
}, | |
], | |
permissions: { | |
role: { // name of role from 'roles' array above | |
insert: { | |
check: '', // '{}' for no checks | |
columns: [], | |
presets: [ | |
{ | |
name: '', | |
type: '', | |
value: '', | |
}, | |
], | |
}, | |
select: { | |
check: '', // '{}' for no checks | |
columns: [], | |
presets: [ | |
{ | |
name: '', | |
type: '', | |
value: '', | |
}, | |
], | |
}, | |
update: { | |
check: '', // '{}' for no checks | |
columns: [], | |
presets: [ | |
{ | |
name: '', | |
type: '', | |
value: '', | |
}, | |
], | |
}, | |
delete: false, // either 'false' or with a check string. | |
}, | |
}, | |
}, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment