Skip to content

feat: CRUD on /roles & /extensions #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 9, 2020
Merged

feat: CRUD on /roles & /extensions #30

merged 6 commits into from
Jul 9, 2020

Conversation

soedirgo
Copy link
Member

@soedirgo soedirgo commented Jul 9, 2020

This PR contains:

@soedirgo soedirgo requested a review from kiwicopple July 9, 2020 01:41
Copy link
Member

@kiwicopple kiwicopple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing work Bobbie. I really like this style. As a reviewer, it makes for super clear reading

Comment on lines +132 to +144
const isSuperuserSql = isSuperuser ? 'SUPERUSER' : 'NOSUPERUSER'
const canCreateDbSql = canCreateDb ? 'CREATEDB' : 'NOCREATEDB'
const canCreateRoleSql = canCreateRole ? 'CREATEROLE' : 'NOCREATEROLE'
const inheritRoleSql = inheritRole ? 'INHERIT' : 'NOINHERIT'
const canLoginSql = canLogin ? 'LOGIN' : 'NOLOGIN'
const isReplicationRoleSql = isReplicationRole ? 'REPLICATION' : 'NOREPLICATION'
const canBypassRlsSql = canBypassRls ? 'BYPASSRLS' : 'NOBYPASSRLS'
const connectionLimitSql = `CONNECTION LIMIT ${connectionLimit}`
const passwordSql = password === undefined ? '' : `PASSWORD '${password}'`
const validUntilSql = validUntil === undefined ? '' : `VALID UNTIL '${validUntil}'`
const memberOfSql = memberOf === undefined ? '' : `IN ROLE ${memberOf.join(',')}`
const membersSql = members === undefined ? '' : `ROLE ${members.join(',')}`
const adminsSql = admins === undefined ? '' : `ADMIN ${admins.join(',')}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@soedirgo soedirgo merged commit 9c1501d into develop Jul 9, 2020
@soedirgo soedirgo deleted the feature/more-crud branch July 9, 2020 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants