-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial API implementation of admin elevation request and expiration (#…
…56) * initial implementation of admin elevation request and expiration (to be handled by core addon) * add wildcard requets subject for clients to use * admin expiry permission check, new audit actions * fix lint * promotion terminology, no wildcard in event subject * revert to one event subject
- Loading branch information
Showing
11 changed files
with
500 additions
and
248 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
CREATE TYPE request_kind AS ENUM ('new_member', 'admin_promotion'); | ||
ALTER TABLE group_membership_requests ADD COLUMN IF NOT EXISTS kind request_kind NOT NULL DEFAULT 'new_member'; | ||
ALTER TABLE group_memberships ADD COLUMN IF NOT EXISTS admin_expires_at TIMESTAMPTZ NULL; | ||
ALTER TABLE group_membership_requests ADD COLUMN IF NOT EXISTS admin_expires_at TIMESTAMPTZ NULL; | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
ALTER TABLE group_membership_requests DROP COLUMN IF EXISTS admin_expires_at; | ||
ALTER TABLE group_memberships DROP COLUMN IF EXISTS admin_expires_at; | ||
ALTER TABLE group_membership_requests DROP COLUMN kind; | ||
DROP TYPE request_kind; | ||
-- +goose StatementEnd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package dbtools | ||
|
||
import "errors" | ||
|
||
// ErrUnknownRequestKind is returned a request kind is unknown | ||
var ErrUnknownRequestKind = errors.New("request kind is unrecognized") |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.